| Index: components/metrics/persistent_system_profile.h
|
| diff --git a/components/metrics/persistent_system_profile.h b/components/metrics/persistent_system_profile.h
|
| index 30d971f66ae6431728863dd9f1d307a023950c33..1775dde9cd423575fe54adca6347101f30502312 100644
|
| --- a/components/metrics/persistent_system_profile.h
|
| +++ b/components/metrics/persistent_system_profile.h
|
| @@ -30,8 +30,14 @@ class PersistentSystemProfile {
|
| void DeregisterPersistentAllocator(
|
| base::PersistentMemoryAllocator* memory_allocator);
|
|
|
| - // Stores a complete system profile.
|
| + // Stores a complete system profile. Use the version taking the serialized
|
| + // version if available to avoid multiple serialization actions.
|
| void SetSystemProfile(const std::string& serialized_profile);
|
| + void SetSystemProfile(const SystemProfileProto& profile);
|
| +
|
| + // Tests if a persistent memory allocator contains an system profile.
|
| + static bool HasSystemProfile(
|
| + const base::PersistentMemoryAllocator& memory_allocator);
|
|
|
| // Retrieves the system profile from a persistent memory allocator. Returns
|
| // true if a profile was successfully retrieved.
|
| @@ -65,6 +71,7 @@ class PersistentSystemProfile {
|
|
|
| // Read a record from the allocator. Do not mix this with "write" calls;
|
| // it's one or the other.
|
| + bool HasMoreData() const;
|
| bool Read(RecordType* type, std::string* record) const;
|
|
|
| base::PersistentMemoryAllocator* allocator() { return allocator_; }
|
|
|