Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Unified Diff: chrome/browser/chrome_browser_field_trials_desktop.cc

Issue 2741043005: Stability file flushing: replace experiment by parameter (Closed)
Patch Set: Merge Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/browser_watcher/features.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_field_trials_desktop.cc
diff --git a/chrome/browser/chrome_browser_field_trials_desktop.cc b/chrome/browser/chrome_browser_field_trials_desktop.cc
index b8b8ecd9fa966071cc7ec447bde03b960e77173e..df807c7a22aa558387b190f888109f576299764b 100644
--- a/chrome/browser/chrome_browser_field_trials_desktop.cc
+++ b/chrome/browser/chrome_browser_field_trials_desktop.cc
@@ -16,8 +16,10 @@
#include "base/feature_list.h"
#include "base/files/file_util.h"
#include "base/metrics/field_trial.h"
+#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_macros.h"
#include "base/path_service.h"
+#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "chrome/browser/features.h"
#include "chrome/browser/prerender/prerender_field_trial.h"
@@ -187,8 +189,10 @@ void SetupStabilityDebugging() {
// metadata nor does it wait for the changes to be flushed to disk before
// returning. This is an expensive operation. Run as an experiment to
// measure the effect on performance and collection.
- if (base::FeatureList::IsEnabled(
- browser_watcher::kStabilityDebuggingFlushFeature)) {
+ const std::string init_flush_param = base::GetFieldTrialParamValueByFeature(
rkaplow 2017/03/13 15:38:00 using GetFieldTrialParamByFeatureAsBool will make
manzagop (departed) 2017/03/13 17:51:26 Done.
+ browser_watcher::kStabilityDebuggingFeature,
+ browser_watcher::kInitFlushParam);
+ if (base::LowerCaseEqualsASCII(init_flush_param, "true")) {
::FlushViewOfFile(global_tracker->allocator()->data(), 0U);
}
}
« no previous file with comments | « no previous file | components/browser_watcher/features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698