| 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/base_login_display_host.h" | 5 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 void BaseLoginDisplayHost::StartWizard( | 137 void BaseLoginDisplayHost::StartWizard( |
| 138 const std::string& first_screen_name, | 138 const std::string& first_screen_name, |
| 139 const GURL& start_url) { | 139 const GURL& start_url) { |
| 140 DVLOG(1) << "Starting wizard, first_screen_name: " << first_screen_name; | 140 DVLOG(1) << "Starting wizard, first_screen_name: " << first_screen_name; |
| 141 // Create and show the wizard. | 141 // Create and show the wizard. |
| 142 // Note, dtor of the old WizardController should be called before ctor of the | 142 // Note, dtor of the old WizardController should be called before ctor of the |
| 143 // new one, because "default_controller()" is updated there. So pure "reset()" | 143 // new one, because "default_controller()" is updated there. So pure "reset()" |
| 144 // is done before new controller creation. | 144 // is done before new controller creation. |
| 145 wizard_controller_.reset(); | 145 wizard_controller_.reset(); |
| 146 | 146 |
| 147 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAllowWebUIOobe)) { | 147 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWebUILogin)) { |
| 148 wizard_controller_.reset(CreateWizardController()); | 148 wizard_controller_.reset(CreateWizardController()); |
| 149 } else { | 149 } else { |
| 150 // Force views based implementation. | 150 // Force views based implementation. |
| 151 wizard_controller_.reset(BaseLoginDisplayHost::CreateWizardController()); | 151 wizard_controller_.reset(BaseLoginDisplayHost::CreateWizardController()); |
| 152 } | 152 } |
| 153 | 153 |
| 154 wizard_controller_->set_start_url(start_url); | 154 wizard_controller_->set_start_url(start_url); |
| 155 ShowBackground(); | 155 ShowBackground(); |
| 156 if (!WizardController::IsDeviceRegistered()) | 156 if (!WizardController::IsDeviceRegistered()) |
| 157 SetOobeProgressBarVisible(true); | 157 SetOobeProgressBarVisible(true); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 if (!timezone_name.empty()) { | 341 if (!timezone_name.empty()) { |
| 342 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( | 342 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( |
| 343 icu::UnicodeString::fromUTF8(timezone_name)); | 343 icu::UnicodeString::fromUTF8(timezone_name)); |
| 344 CHECK(timezone) << "Timezone could not be set for " << timezone_name; | 344 CHECK(timezone) << "Timezone could not be set for " << timezone_name; |
| 345 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); | 345 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); |
| 346 } | 346 } |
| 347 } | 347 } |
| 348 } | 348 } |
| 349 | 349 |
| 350 } // namespace browser | 350 } // namespace browser |
| OLD | NEW |