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 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1450 | 1450 |
1451 Profile* profile = CreateProfile(parameters, user_data_dir); | 1451 Profile* profile = CreateProfile(parameters, user_data_dir); |
1452 if (!profile) | 1452 if (!profile) |
1453 return ResultCodes::NORMAL_EXIT; | 1453 return ResultCodes::NORMAL_EXIT; |
1454 | 1454 |
1455 // Post-profile init --------------------------------------------------------- | 1455 // Post-profile init --------------------------------------------------------- |
1456 | 1456 |
1457 PrefService* user_prefs = profile->GetPrefs(); | 1457 PrefService* user_prefs = profile->GetPrefs(); |
1458 DCHECK(user_prefs); | 1458 DCHECK(user_prefs); |
1459 | 1459 |
1460 // Override the default ContentBrowserClient to let Chrome participate in | 1460 // Override the default ContentBrowserClient and to let Chrome participate in |
jam
2011/03/25 02:10:02
nit: it was written like that on purpose. putting
Evan Stade
2011/03/29 00:14:17
(besides the fact that it's ungrammatical now)
I
| |
1461 // content logic. Must be done before any tabs are created. | 1461 // content logic. Must be done before any tabs are created. |
1462 chrome::ChromeContentBrowserClient browser_client; | 1462 chrome::ChromeContentBrowserClient browser_client; |
1463 content::GetContentClient()->set_browser(&browser_client); | 1463 content::GetContentClient()->set_browser(&browser_client); |
1464 | 1464 |
1465 // Tests should be able to tune login manager before showing it. | 1465 // Tests should be able to tune login manager before showing it. |
1466 // Thus only show login manager in normal (non-testing) mode. | 1466 // Thus only show login manager in normal (non-testing) mode. |
1467 if (!parameters.ui_task) { | 1467 if (!parameters.ui_task) { |
1468 OptionallyRunChromeOSLoginManager(parsed_command_line); | 1468 OptionallyRunChromeOSLoginManager(parsed_command_line); |
1469 } | 1469 } |
1470 | 1470 |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1863 #if defined(OS_CHROMEOS) | 1863 #if defined(OS_CHROMEOS) |
1864 // To be precise, logout (browser shutdown) is not yet done, but the | 1864 // To be precise, logout (browser shutdown) is not yet done, but the |
1865 // remaining work is negligible, hence we say LogoutDone here. | 1865 // remaining work is negligible, hence we say LogoutDone here. |
1866 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1866 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1867 false); | 1867 false); |
1868 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1868 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1869 #endif | 1869 #endif |
1870 TRACE_EVENT_END("BrowserMain", 0, 0); | 1870 TRACE_EVENT_END("BrowserMain", 0, 0); |
1871 return result_code; | 1871 return result_code; |
1872 } | 1872 } |
OLD | NEW |