Change DeviceFiles Helpers to Accept std::string

(This is a merge of http://go/wvgerrit/13922 from the Widevine CDM
repository.)

I'm not sure why we chose to pass char* instead of std::string to the
helper functions in DeviceFiles, but it seems to require a lot of
gymnastics of the calling code for minimal gain.

Change-Id: Ie0cdec80ab77c94370648dd74249124aed6e8be1
This commit is contained in:
John "Juce" Bruce
2015-03-31 17:29:44 -07:00
parent c66badec60
commit 69a9f8edb2
2 changed files with 33 additions and 71 deletions

View File

@@ -85,12 +85,15 @@ class DeviceFiles {
private:
// Helpers that wrap the File interface and automatically handle hashing, as
// well as adding the device files base path to to the file name.
bool StoreFileWithHash(const char* name, const std::string& serialized_file);
bool StoreFileRaw(const char* name, const std::string& serialized_file);
bool RetrieveHashedFile(const char* name, std::string* serialized_file);
bool FileExists(const char* name);
bool RemoveFile(const char* name);
ssize_t GetFileSize(const char* name);
bool StoreFileWithHash(const std::string& name,
const std::string& serialized_file);
bool StoreFileRaw(const std::string& name,
const std::string& serialized_file);
bool RetrieveHashedFile(const std::string& name,
std::string* serialized_file);
bool FileExists(const std::string& name);
bool RemoveFile(const std::string& name);
ssize_t GetFileSize(const std::string& name);
// Certificate and offline licenses are now stored in security
// level specific directories. In an earlier version they were