| OLD | NEW |
| 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 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1418 (parsed_command_line.HasSwitch(switches::kApp) || | 1418 (parsed_command_line.HasSwitch(switches::kApp) || |
| 1419 parsed_command_line.HasSwitch(switches::kAppId) || | 1419 parsed_command_line.HasSwitch(switches::kAppId) || |
| 1420 parsed_command_line.HasSwitch(switches::kNoFirstRun))) | 1420 parsed_command_line.HasSwitch(switches::kNoFirstRun))) |
| 1421 first_run_ui_bypass = true; | 1421 first_run_ui_bypass = true; |
| 1422 } | 1422 } |
| 1423 | 1423 |
| 1424 // TODO(viettrungluu): why don't we run this earlier? | 1424 // TODO(viettrungluu): why don't we run this earlier? |
| 1425 if (!parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) | 1425 if (!parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) |
| 1426 WarnAboutMinimumSystemRequirements(); | 1426 WarnAboutMinimumSystemRequirements(); |
| 1427 | 1427 |
| 1428 // Enable print preview once for supported platforms. |
| 1429 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
| 1430 local_state->RegisterBooleanPref(prefs::kPrintingPrintPreviewEnabledOnce, |
| 1431 false, |
| 1432 PrefService::UNSYNCABLE_PREF); |
| 1433 if (!local_state->GetBoolean(prefs::kPrintingPrintPreviewEnabledOnce)) { |
| 1434 local_state->SetBoolean(prefs::kPrintingPrintPreviewEnabledOnce, true); |
| 1435 about_flags::SetExperimentEnabled(local_state, "print-preview", true); |
| 1436 } |
| 1437 #endif |
| 1438 |
| 1428 // Convert active labs into switches. Modifies the current command line. | 1439 // Convert active labs into switches. Modifies the current command line. |
| 1429 about_flags::ConvertFlagsToSwitches(local_state, | 1440 about_flags::ConvertFlagsToSwitches(local_state, |
| 1430 CommandLine::ForCurrentProcess()); | 1441 CommandLine::ForCurrentProcess()); |
| 1431 | 1442 |
| 1432 InitializeNetworkOptions(parsed_command_line); | 1443 InitializeNetworkOptions(parsed_command_line); |
| 1433 InitializeURLRequestThrottlerManager(browser_process->net_log()); | 1444 InitializeURLRequestThrottlerManager(browser_process->net_log()); |
| 1434 | 1445 |
| 1435 // Initialize histogram synchronizer system. This is a singleton and is used | 1446 // Initialize histogram synchronizer system. This is a singleton and is used |
| 1436 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of | 1447 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of |
| 1437 // scope. Even though NewRunnableMethod does AddRef and Release, the object | 1448 // scope. Even though NewRunnableMethod does AddRef and Release, the object |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1995 #if defined(OS_CHROMEOS) | 2006 #if defined(OS_CHROMEOS) |
| 1996 // To be precise, logout (browser shutdown) is not yet done, but the | 2007 // To be precise, logout (browser shutdown) is not yet done, but the |
| 1997 // remaining work is negligible, hence we say LogoutDone here. | 2008 // remaining work is negligible, hence we say LogoutDone here. |
| 1998 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 2009 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 1999 false); | 2010 false); |
| 2000 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 2011 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 2001 #endif | 2012 #endif |
| 2002 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 2013 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
| 2003 return result_code; | 2014 return result_code; |
| 2004 } | 2015 } |
| OLD | NEW |