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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 14017013: Initialize CrosSettings before SetupMetrics (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « chrome/browser/browser_process_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index e3911aae30a1d34c72fe6fa7c3b2704c789eaade..1112a05b7dd5e7f3aed8e5ee90cb97dd5453c90b 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -946,6 +946,12 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
SecKeychainAddCallback(&KeychainCallback, 0, NULL);
#endif
+#if defined(OS_CHROMEOS)
+ // Must be done after g_browser_process is constructed, before
+ // SetupMetricsAndFieldTrials().
+ chromeos::CrosSettings::Initialize();
+#endif
+
// Now the command line has been mutated based on about:flags, we can setup
// metrics and initialize field trials. The field trials are needed by
// IOThread's initialization which happens in BrowserProcess:PreCreateThreads.
@@ -1675,6 +1681,10 @@ void ChromeBrowserMainParts::PostDestroyThreads() {
// to bypass this code. Perhaps we need a *final* hook that is called on all
// paths from content/browser/browser_main.
CHECK(MetricsService::UmaMetricsProperlyShutdown());
+
+#if defined(OS_CHROMEOS)
+ chromeos::CrosSettings::Shutdown();
+#endif
#endif
}
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698