| Index: base/metrics/persistent_histogram_allocator.h
|
| diff --git a/base/metrics/persistent_histogram_allocator.h b/base/metrics/persistent_histogram_allocator.h
|
| index 7f46dc9664bd6a45d3c010f8cebd100e9ddce25a..d29d92d18a915ca0f53399ced390ca931be3ba5b 100644
|
| --- a/base/metrics/persistent_histogram_allocator.h
|
| +++ b/base/metrics/persistent_histogram_allocator.h
|
| @@ -398,6 +398,16 @@ class BASE_EXPORT GlobalHistogramAllocator
|
| // in other ways.
|
| static std::unique_ptr<GlobalHistogramAllocator> ReleaseForTesting();
|
|
|
| + // Stores a pathname to which the contents of this allocator should be saved
|
| + // in order to persist the data for a later use.
|
| + void SetPersistentLocation(const FilePath& location);
|
| +
|
| + // Writes the internal data to a previously set location. This is generally
|
| + // called when a process is exiting from a section of code that may not know
|
| + // the filesystem. The data is written in an atomic manner. The return value
|
| + // indicates success.
|
| + bool WriteToPersistentLocation();
|
| +
|
| private:
|
| friend class StatisticsRecorder;
|
|
|
| @@ -416,6 +426,9 @@ class BASE_EXPORT GlobalHistogramAllocator
|
| // iterator to continue the work.
|
| Iterator import_iterator_;
|
|
|
| + // The location to which the data should be persisted.
|
| + FilePath persistent_location_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(GlobalHistogramAllocator);
|
| };
|
|
|
|
|