OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/login/screens/error_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/error_screen.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h" | 8 #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h" |
9 #include "chrome/browser/chromeos/login/chrome_restart_request.h" | 9 #include "chrome/browser/chromeos/login/chrome_restart_request.h" |
10 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" | 10 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 NOTREACHED() << "Guest login failed."; | 67 NOTREACHED() << "Guest login failed."; |
68 guest_login_performer_.reset(); | 68 guest_login_performer_.reset(); |
69 } | 69 } |
70 | 70 |
71 void ErrorScreen::OnAuthSuccess(const UserContext& user_context) { | 71 void ErrorScreen::OnAuthSuccess(const UserContext& user_context) { |
72 LOG(FATAL); | 72 LOG(FATAL); |
73 } | 73 } |
74 | 74 |
75 void ErrorScreen::OnOffTheRecordAuthSuccess() { | 75 void ErrorScreen::OnOffTheRecordAuthSuccess() { |
76 // Restart Chrome to enter the guest session. | 76 // Restart Chrome to enter the guest session. |
77 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 77 const base::CommandLine& browser_command_line = |
78 CommandLine command_line(browser_command_line.GetProgram()); | 78 *base::CommandLine::ForCurrentProcess(); |
| 79 base::CommandLine command_line(browser_command_line.GetProgram()); |
79 std::string cmd_line_str = | 80 std::string cmd_line_str = |
80 GetOffTheRecordCommandLine(GURL(), | 81 GetOffTheRecordCommandLine(GURL(), |
81 StartupUtils::IsOobeCompleted(), | 82 StartupUtils::IsOobeCompleted(), |
82 browser_command_line, | 83 browser_command_line, |
83 &command_line); | 84 &command_line); |
84 | 85 |
85 RestartChrome(cmd_line_str); | 86 RestartChrome(cmd_line_str); |
86 } | 87 } |
87 | 88 |
88 void ErrorScreen::OnPasswordChangeDetected() { | 89 void ErrorScreen::OnPasswordChangeDetected() { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 } | 176 } |
176 | 177 |
177 if (guest_login_performer_) | 178 if (guest_login_performer_) |
178 return; | 179 return; |
179 | 180 |
180 guest_login_performer_.reset(new ChromeLoginPerformer(this)); | 181 guest_login_performer_.reset(new ChromeLoginPerformer(this)); |
181 guest_login_performer_->LoginOffTheRecord(); | 182 guest_login_performer_->LoginOffTheRecord(); |
182 } | 183 } |
183 | 184 |
184 } // namespace chromeos | 185 } // namespace chromeos |
OLD | NEW |