Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(714)

Side by Side Diff: chrome/browser/chromeos/login/base_login_display_host.cc

Issue 8588006: Eliminate CrosLibrary::EnsureLoaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 // Check whether we need to execute OOBE process. 241 // Check whether we need to execute OOBE process.
242 bool oobe_complete = chromeos::WizardController::IsOobeCompleted(); 242 bool oobe_complete = chromeos::WizardController::IsOobeCompleted();
243 bool show_login_screen = 243 bool show_login_screen =
244 (first_screen_name.empty() && oobe_complete) || 244 (first_screen_name.empty() && oobe_complete) ||
245 first_screen_name == chromeos::WizardController::kLoginScreenName; 245 first_screen_name == chromeos::WizardController::kLoginScreenName;
246 246
247 chromeos::LoginDisplayHost* display_host; 247 chromeos::LoginDisplayHost* display_host;
248 display_host = new chromeos::WebUILoginDisplayHost(screen_bounds); 248 display_host = new chromeos::WebUILoginDisplayHost(screen_bounds);
249 249
250 if (show_login_screen && chromeos::CrosLibrary::Get()->EnsureLoaded()) { 250 if (show_login_screen) {
251 // R11 > R12 migration fix. See http://crosbug.com/p/4898. 251 // R11 > R12 migration fix. See http://crosbug.com/p/4898.
252 // If user has manually changed locale during R11 OOBE, locale will be set. 252 // If user has manually changed locale during R11 OOBE, locale will be set.
253 // On R12 > R12|R13 etc. this fix won't get activated since 253 // On R12 > R12|R13 etc. this fix won't get activated since
254 // OOBE process has set kApplicationLocale to non-default value. 254 // OOBE process has set kApplicationLocale to non-default value.
255 PrefService* prefs = g_browser_process->local_state(); 255 PrefService* prefs = g_browser_process->local_state();
256 if (!prefs->HasPrefPath(prefs::kApplicationLocale)) { 256 if (!prefs->HasPrefPath(prefs::kApplicationLocale)) {
257 std::string locale = chromeos::WizardController::GetInitialLocale(); 257 std::string locale = chromeos::WizardController::GetInitialLocale();
258 prefs->SetString(prefs::kApplicationLocale, locale); 258 prefs->SetString(prefs::kApplicationLocale, locale);
259 manager->EnableInputMethods( 259 manager->EnableInputMethods(
260 locale, 260 locale,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 // user has changed to during OOBE. 328 // user has changed to during OOBE.
329 if (!timezone_name.empty()) { 329 if (!timezone_name.empty()) {
330 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( 330 icu::TimeZone* timezone = icu::TimeZone::createTimeZone(
331 icu::UnicodeString::fromUTF8(timezone_name)); 331 icu::UnicodeString::fromUTF8(timezone_name));
332 CHECK(timezone) << "Timezone could not be set for " << timezone_name; 332 CHECK(timezone) << "Timezone could not be set for " << timezone_name;
333 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); 333 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone);
334 } 334 }
335 } 335 }
336 336
337 } // namespace browser 337 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/cros_library.h ('k') | chrome/browser/chromeos/login/cryptohome_op.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698