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/chromeos/login/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
6 | 6 |
7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
8 #include <signal.h> | 8 #include <signal.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 | 10 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 chromeos::RegistrationScreen* WizardController::GetRegistrationScreen() { | 195 chromeos::RegistrationScreen* WizardController::GetRegistrationScreen() { |
196 if (!registration_screen_.get()) | 196 if (!registration_screen_.get()) |
197 registration_screen_.reset( | 197 registration_screen_.reset( |
198 new chromeos::RegistrationScreen( | 198 new chromeos::RegistrationScreen( |
199 oobe_display_->GetRegistrationScreenActor())); | 199 oobe_display_->GetRegistrationScreenActor())); |
200 return registration_screen_.get(); | 200 return registration_screen_.get(); |
201 } | 201 } |
202 | 202 |
203 chromeos::HTMLPageScreen* WizardController::GetHTMLPageScreen() { | 203 chromeos::HTMLPageScreen* WizardController::GetHTMLPageScreen() { |
204 if (!html_page_screen_.get()) { | 204 if (!html_page_screen_.get()) { |
205 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 205 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 206 const CommandLine::StringVector& args = cmd_line->GetArgs(); |
| 207 |
206 std::string url; | 208 std::string url; |
207 // It's strange but args may contains empty strings. | 209 // It's strange but args may contains empty strings. |
208 for (size_t i = 0; i < command_line->args().size(); i++) { | 210 for (size_t i = 0; i < args.size(); i++) { |
209 if (!command_line->args()[i].empty()) { | 211 if (!args[i].empty()) { |
210 DCHECK(url.empty()) << "More than one URL in command line"; | 212 DCHECK(url.empty()) << "More than one URL in command line"; |
211 url = command_line->args()[i]; | 213 url = args[i]; |
212 } | 214 } |
213 } | 215 } |
214 DCHECK(!url.empty()) << "No URL in commane line"; | 216 DCHECK(!url.empty()) << "No URL in command line"; |
215 html_page_screen_.reset( | 217 html_page_screen_.reset( |
216 new chromeos::HTMLPageScreen( | 218 new chromeos::HTMLPageScreen( |
217 oobe_display_->GetHTMLPageScreenActor(), url)); | 219 oobe_display_->GetHTMLPageScreenActor(), url)); |
218 } | 220 } |
219 return html_page_screen_.get(); | 221 return html_page_screen_.get(); |
220 } | 222 } |
221 | 223 |
222 chromeos::EnterpriseEnrollmentScreen* | 224 chromeos::EnterpriseEnrollmentScreen* |
223 WizardController::GetEnterpriseEnrollmentScreen() { | 225 WizardController::GetEnterpriseEnrollmentScreen() { |
224 if (!enterprise_enrollment_screen_.get()) { | 226 if (!enterprise_enrollment_screen_.get()) { |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 | 679 |
678 bool WizardController::usage_statistics_reporting() const { | 680 bool WizardController::usage_statistics_reporting() const { |
679 return usage_statistics_reporting_; | 681 return usage_statistics_reporting_; |
680 } | 682 } |
681 | 683 |
682 void WizardController::SetZeroDelays() { | 684 void WizardController::SetZeroDelays() { |
683 kShowDelayMs = 0; | 685 kShowDelayMs = 0; |
684 } | 686 } |
685 | 687 |
686 } // namespace chromeos | 688 } // namespace chromeos |
OLD | NEW |