| Index: chrome/browser/chrome_browser_field_trials.cc
|
| diff --git a/chrome/browser/chrome_browser_field_trials.cc b/chrome/browser/chrome_browser_field_trials.cc
|
| index 682271f04904f4c105a633e168a60741ceeeff5f..9a3f95ab032a850f807b87b6f7626b8d1346baf2 100644
|
| --- a/chrome/browser/chrome_browser_field_trials.cc
|
| +++ b/chrome/browser/chrome_browser_field_trials.cc
|
| @@ -10,7 +10,7 @@
|
| #include "base/feature_list.h"
|
| #include "base/metrics/field_trial.h"
|
| #include "base/metrics/histogram_base.h"
|
| -#include "base/metrics/histogram_persistence.h"
|
| +#include "base/metrics/persistent_histogram_allocator.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/time/time.h"
|
| #include "build/build_config.h"
|
| @@ -33,12 +33,14 @@ void InstantiatePersistentHistograms() {
|
| // Create persistent/shared memory and allow histograms to be stored in it.
|
| // Memory that is not actualy used won't be physically mapped by the system.
|
| // BrowserMetrics usage peaked around 95% of 2MiB as of 2016-02-20.
|
| - base::SetPersistentHistogramMemoryAllocator(
|
| - new base::LocalPersistentMemoryAllocator(3 << 20, // 3 MiB
|
| - 0x935DDD43, // SHA1(B...M...)
|
| - kAllocatorName));
|
| - base::GetPersistentHistogramMemoryAllocator()->CreateTrackingHistograms(
|
| - kAllocatorName);
|
| + base::PersistentHistogramAllocator::SetGlobalAllocator(
|
| + make_scoped_ptr(new base::PersistentHistogramAllocator(
|
| + make_scoped_ptr(new base::LocalPersistentMemoryAllocator(
|
| + 3 << 20, // 3 MiB
|
| + 0x935DDD43, // SHA1(BrowserMetrics)
|
| + kAllocatorName)))));
|
| + base::PersistentHistogramAllocator::GetGlobalAllocator()
|
| + ->CreateTrackingHistograms(kAllocatorName);
|
| }
|
| }
|
|
|
|
|