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

Side by Side Diff: chrome/browser/browser_main.cc

Issue 6267009: Move experiments settings (about:flags) from profile to local state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/dom_ui/flags_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browser_main.h" 5 #include "chrome/browser/browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 // Initialize histogram synchronizer system. This is a singleton and is used 1237 // Initialize histogram synchronizer system. This is a singleton and is used
1238 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of 1238 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of
1239 // scope. Even though NewRunnableMethod does AddRef and Release, the object 1239 // scope. Even though NewRunnableMethod does AddRef and Release, the object
1240 // will not be deleted after the Task is executed. 1240 // will not be deleted after the Task is executed.
1241 scoped_refptr<HistogramSynchronizer> histogram_synchronizer( 1241 scoped_refptr<HistogramSynchronizer> histogram_synchronizer(
1242 new HistogramSynchronizer()); 1242 new HistogramSynchronizer());
1243 1243
1244 // Initialize the prefs of the local state. 1244 // Initialize the prefs of the local state.
1245 browser::RegisterLocalState(local_state); 1245 browser::RegisterLocalState(local_state);
1246 1246
1247 // Convert active labs into switches. Modifies the current command line.
1248 about_flags::ConvertFlagsToSwitches(local_state,
1249 CommandLine::ForCurrentProcess());
1250
1247 // Now that all preferences have been registered, set the install date 1251 // Now that all preferences have been registered, set the install date
1248 // for the uninstall metrics if this is our first run. This only actually 1252 // for the uninstall metrics if this is our first run. This only actually
1249 // gets used if the user has metrics reporting enabled at uninstall time. 1253 // gets used if the user has metrics reporting enabled at uninstall time.
1250 int64 install_date = 1254 int64 install_date =
1251 local_state->GetInt64(prefs::kUninstallMetricsInstallDate); 1255 local_state->GetInt64(prefs::kUninstallMetricsInstallDate);
1252 if (install_date == 0) { 1256 if (install_date == 0) {
1253 local_state->SetInt64(prefs::kUninstallMetricsInstallDate, 1257 local_state->SetInt64(prefs::kUninstallMetricsInstallDate,
1254 base::Time::Now().ToTimeT()); 1258 base::Time::Now().ToTimeT());
1255 } 1259 }
1256 1260
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) 1576 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD)
1573 if (parsed_command_line.HasSwitch(switches::kDebugPrint)) { 1577 if (parsed_command_line.HasSwitch(switches::kDebugPrint)) {
1574 FilePath path = 1578 FilePath path =
1575 parsed_command_line.GetSwitchValuePath(switches::kDebugPrint); 1579 parsed_command_line.GetSwitchValuePath(switches::kDebugPrint);
1576 printing::PrintedDocument::set_debug_dump_path(path); 1580 printing::PrintedDocument::set_debug_dump_path(path);
1577 } 1581 }
1578 #endif 1582 #endif
1579 1583
1580 HandleTestParameters(parsed_command_line); 1584 HandleTestParameters(parsed_command_line);
1581 RecordBreakpadStatusUMA(metrics); 1585 RecordBreakpadStatusUMA(metrics);
1582 about_flags::RecordUMAStatistics(user_prefs); 1586 about_flags::RecordUMAStatistics(local_state);
1583 1587
1584 // Stat the directory with the inspector's files so that we can know if we 1588 // Stat the directory with the inspector's files so that we can know if we
1585 // should display the entry in the context menu or not. 1589 // should display the entry in the context menu or not.
1586 browser_process->CheckForInspectorFiles(); 1590 browser_process->CheckForInspectorFiles();
1587 1591
1588 #if defined(OS_CHROMEOS) 1592 #if defined(OS_CHROMEOS)
1589 metrics->StartExternalMetrics(); 1593 metrics->StartExternalMetrics();
1590 #endif 1594 #endif
1591 1595
1592 // Initialize extension event routers. Note that on Chrome OS, this will 1596 // Initialize extension event routers. Note that on Chrome OS, this will
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1749 #if defined(OS_CHROMEOS) 1753 #if defined(OS_CHROMEOS)
1750 // To be precise, logout (browser shutdown) is not yet done, but the 1754 // To be precise, logout (browser shutdown) is not yet done, but the
1751 // remaining work is negligible, hence we say LogoutDone here. 1755 // remaining work is negligible, hence we say LogoutDone here.
1752 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1756 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1753 false); 1757 false);
1754 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1758 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1755 #endif 1759 #endif
1756 TRACE_EVENT_END("BrowserMain", 0, 0); 1760 TRACE_EVENT_END("BrowserMain", 0, 0);
1757 return result_code; 1761 return result_code;
1758 } 1762 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/dom_ui/flags_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698