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

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

Issue 6389002: Patch to restore 6267009 (move 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 | « chrome/browser/about_flags.cc ('k') | 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 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 // Initialize histogram synchronizer system. This is a singleton and is used 1238 // Initialize histogram synchronizer system. This is a singleton and is used
1239 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of 1239 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of
1240 // scope. Even though NewRunnableMethod does AddRef and Release, the object 1240 // scope. Even though NewRunnableMethod does AddRef and Release, the object
1241 // will not be deleted after the Task is executed. 1241 // will not be deleted after the Task is executed.
1242 scoped_refptr<HistogramSynchronizer> histogram_synchronizer( 1242 scoped_refptr<HistogramSynchronizer> histogram_synchronizer(
1243 new HistogramSynchronizer()); 1243 new HistogramSynchronizer());
1244 1244
1245 // Initialize the prefs of the local state. 1245 // Initialize the prefs of the local state.
1246 browser::RegisterLocalState(local_state); 1246 browser::RegisterLocalState(local_state);
1247 1247
1248 // Convert active labs into switches. Modifies the current command line.
1249 about_flags::ConvertFlagsToSwitches(local_state,
1250 CommandLine::ForCurrentProcess());
1251
1248 // Now that all preferences have been registered, set the install date 1252 // Now that all preferences have been registered, set the install date
1249 // for the uninstall metrics if this is our first run. This only actually 1253 // for the uninstall metrics if this is our first run. This only actually
1250 // gets used if the user has metrics reporting enabled at uninstall time. 1254 // gets used if the user has metrics reporting enabled at uninstall time.
1251 int64 install_date = 1255 int64 install_date =
1252 local_state->GetInt64(prefs::kUninstallMetricsInstallDate); 1256 local_state->GetInt64(prefs::kUninstallMetricsInstallDate);
1253 if (install_date == 0) { 1257 if (install_date == 0) {
1254 local_state->SetInt64(prefs::kUninstallMetricsInstallDate, 1258 local_state->SetInt64(prefs::kUninstallMetricsInstallDate,
1255 base::Time::Now().ToTimeT()); 1259 base::Time::Now().ToTimeT());
1256 } 1260 }
1257 1261
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) 1577 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD)
1574 if (parsed_command_line.HasSwitch(switches::kDebugPrint)) { 1578 if (parsed_command_line.HasSwitch(switches::kDebugPrint)) {
1575 FilePath path = 1579 FilePath path =
1576 parsed_command_line.GetSwitchValuePath(switches::kDebugPrint); 1580 parsed_command_line.GetSwitchValuePath(switches::kDebugPrint);
1577 printing::PrintedDocument::set_debug_dump_path(path); 1581 printing::PrintedDocument::set_debug_dump_path(path);
1578 } 1582 }
1579 #endif 1583 #endif
1580 1584
1581 HandleTestParameters(parsed_command_line); 1585 HandleTestParameters(parsed_command_line);
1582 RecordBreakpadStatusUMA(metrics); 1586 RecordBreakpadStatusUMA(metrics);
1583 about_flags::RecordUMAStatistics(user_prefs); 1587 about_flags::RecordUMAStatistics(local_state);
1584 1588
1585 // Stat the directory with the inspector's files so that we can know if we 1589 // Stat the directory with the inspector's files so that we can know if we
1586 // should display the entry in the context menu or not. 1590 // should display the entry in the context menu or not.
1587 browser_process->CheckForInspectorFiles(); 1591 browser_process->CheckForInspectorFiles();
1588 1592
1589 #if defined(OS_CHROMEOS) 1593 #if defined(OS_CHROMEOS)
1590 metrics->StartExternalMetrics(); 1594 metrics->StartExternalMetrics();
1591 #endif 1595 #endif
1592 1596
1593 // Initialize extension event routers. Note that on Chrome OS, this will 1597 // Initialize extension event routers. Note that on Chrome OS, this will
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 #if defined(OS_CHROMEOS) 1777 #if defined(OS_CHROMEOS)
1774 // To be precise, logout (browser shutdown) is not yet done, but the 1778 // To be precise, logout (browser shutdown) is not yet done, but the
1775 // remaining work is negligible, hence we say LogoutDone here. 1779 // remaining work is negligible, hence we say LogoutDone here.
1776 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1780 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1777 false); 1781 false);
1778 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1782 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1779 #endif 1783 #endif
1780 TRACE_EVENT_END("BrowserMain", 0, 0); 1784 TRACE_EVENT_END("BrowserMain", 0, 0);
1781 return result_code; 1785 return result_code;
1782 } 1786 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/dom_ui/flags_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698