OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1591 ChildProcess::WaitForDebugger(L"Browser"); | 1591 ChildProcess::WaitForDebugger(L"Browser"); |
1592 } | 1592 } |
1593 | 1593 |
1594 // If remoting or cloud print proxy is enabled and setup has been completed | 1594 // If remoting or cloud print proxy is enabled and setup has been completed |
1595 // we start the service process here. | 1595 // we start the service process here. |
1596 // The prerequisite for running the service process is that we have IO, UI | 1596 // The prerequisite for running the service process is that we have IO, UI |
1597 // and PROCESS_LAUNCHER threads up and running. | 1597 // and PROCESS_LAUNCHER threads up and running. |
1598 // TODO(hclam): Need to check for cloud print proxy too. | 1598 // TODO(hclam): Need to check for cloud print proxy too. |
1599 if (parsed_command_line.HasSwitch(switches::kEnableRemoting)) { | 1599 if (parsed_command_line.HasSwitch(switches::kEnableRemoting)) { |
1600 if (user_prefs->GetBoolean(prefs::kRemotingHasSetupCompleted)) { | 1600 if (user_prefs->GetBoolean(prefs::kRemotingHasSetupCompleted)) { |
1601 ServiceProcessControl* control = ServiceProcessControlManager::instance() | 1601 ServiceProcessControl* control = |
1602 ->GetProcessControl(profile); | 1602 ServiceProcessControlManager::GetInstance()->GetProcessControl( |
| 1603 profile); |
1603 control->Launch(NULL, NULL); | 1604 control->Launch(NULL, NULL); |
1604 } | 1605 } |
1605 } | 1606 } |
1606 | 1607 |
1607 #if defined(OS_CHROMEOS) | 1608 #if defined(OS_CHROMEOS) |
1608 // Run the Out of Memory priority manager while in this scope. Wait | 1609 // Run the Out of Memory priority manager while in this scope. Wait |
1609 // until here to start so that we give the most amount of time for | 1610 // until here to start so that we give the most amount of time for |
1610 // the other services to start up before we start adjusting the oom | 1611 // the other services to start up before we start adjusting the oom |
1611 // priority. In reality, it doesn't matter much where in this scope | 1612 // priority. In reality, it doesn't matter much where in this scope |
1612 // this is started, but it must be started in this scope so it will | 1613 // this is started, but it must be started in this scope so it will |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 #if defined(OS_CHROMEOS) | 1717 #if defined(OS_CHROMEOS) |
1717 // To be precise, logout (browser shutdown) is not yet done, but the | 1718 // To be precise, logout (browser shutdown) is not yet done, but the |
1718 // remaining work is negligible, hence we say LogoutDone here. | 1719 // remaining work is negligible, hence we say LogoutDone here. |
1719 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1720 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1720 false); | 1721 false); |
1721 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1722 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1722 #endif | 1723 #endif |
1723 TRACE_EVENT_END("BrowserMain", 0, 0); | 1724 TRACE_EVENT_END("BrowserMain", 0, 0); |
1724 return result_code; | 1725 return result_code; |
1725 } | 1726 } |
OLD | NEW |