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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user