| 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 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 #endif | 1085 #endif |
| 1086 } | 1086 } |
| 1087 | 1087 |
| 1088 #if defined(OS_CHROMEOS) | 1088 #if defined(OS_CHROMEOS) |
| 1089 | 1089 |
| 1090 // Class is used to login using passed username and password. | 1090 // Class is used to login using passed username and password. |
| 1091 // The instance will be deleted upon success or failure. | 1091 // The instance will be deleted upon success or failure. |
| 1092 class StubLogin : public chromeos::LoginStatusConsumer, | 1092 class StubLogin : public chromeos::LoginStatusConsumer, |
| 1093 public chromeos::LoginUtils::Delegate { | 1093 public chromeos::LoginUtils::Delegate { |
| 1094 public: | 1094 public: |
| 1095 explicit StubLogin(std::string username, std::string password) { | 1095 StubLogin(std::string username, std::string password) { |
| 1096 authenticator_ = chromeos::LoginUtils::Get()->CreateAuthenticator(this); | 1096 authenticator_ = chromeos::LoginUtils::Get()->CreateAuthenticator(this); |
| 1097 authenticator_.get()->AuthenticateToLogin( | 1097 authenticator_.get()->AuthenticateToLogin( |
| 1098 g_browser_process->profile_manager()->GetDefaultProfile(), | 1098 g_browser_process->profile_manager()->GetDefaultProfile(), |
| 1099 username, | 1099 username, |
| 1100 password, | 1100 password, |
| 1101 std::string(), | 1101 std::string(), |
| 1102 std::string()); | 1102 std::string()); |
| 1103 } | 1103 } |
| 1104 | 1104 |
| 1105 void OnLoginFailure(const chromeos::LoginFailure& error) { | 1105 void OnLoginFailure(const chromeos::LoginFailure& error) { |
| (...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2103 #if defined(OS_CHROMEOS) | 2103 #if defined(OS_CHROMEOS) |
| 2104 // To be precise, logout (browser shutdown) is not yet done, but the | 2104 // To be precise, logout (browser shutdown) is not yet done, but the |
| 2105 // remaining work is negligible, hence we say LogoutDone here. | 2105 // remaining work is negligible, hence we say LogoutDone here. |
| 2106 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 2106 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 2107 false); | 2107 false); |
| 2108 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 2108 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 2109 #endif | 2109 #endif |
| 2110 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 2110 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
| 2111 return result_code; | 2111 return result_code; |
| 2112 } | 2112 } |
| OLD | NEW |