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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 14643006: [chromeos] Remove dependencies of StatisticsProvider on chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 7 years, 7 months 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) 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/ui/webui/chromeos/login/oobe_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 23 matching lines...) Expand all
34 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" 34 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
35 #include "chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler .h" 35 #include "chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler .h"
36 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" 36 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h"
37 #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h" 37 #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h"
38 #include "chrome/browser/ui/webui/chromeos/login/wrong_hwid_screen_handler.h" 38 #include "chrome/browser/ui/webui/chromeos/login/wrong_hwid_screen_handler.h"
39 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" 39 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h"
40 #include "chrome/browser/ui/webui/theme_source.h" 40 #include "chrome/browser/ui/webui/theme_source.h"
41 #include "chrome/common/chrome_constants.h" 41 #include "chrome/common/chrome_constants.h"
42 #include "chrome/common/chrome_switches.h" 42 #include "chrome/common/chrome_switches.h"
43 #include "chrome/common/url_constants.h" 43 #include "chrome/common/url_constants.h"
44 #include "chromeos/chromeos_constants.h"
44 #include "content/public/browser/web_ui.h" 45 #include "content/public/browser/web_ui.h"
45 #include "content/public/browser/web_ui_data_source.h" 46 #include "content/public/browser/web_ui_data_source.h"
46 #include "grit/browser_resources.h" 47 #include "grit/browser_resources.h"
47 #include "ui/base/resource/resource_bundle.h" 48 #include "ui/base/resource/resource_bundle.h"
48 #include "ui/webui/web_ui_util.h" 49 #include "ui/webui/web_ui_util.h"
49 50
50 namespace chromeos { 51 namespace chromeos {
51 52
52 namespace { 53 namespace {
53 54
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 if (!UserManager::Get()->IsUserLoggedIn()) 339 if (!UserManager::Get()->IsUserLoggedIn())
339 localized_strings->SetString("screenType", "login"); 340 localized_strings->SetString("screenType", "login");
340 else 341 else
341 localized_strings->SetString("screenType", "login-add-user"); 342 localized_strings->SetString("screenType", "login-add-user");
342 } else { 343 } else {
343 localized_strings->SetString("screenType", "lock"); 344 localized_strings->SetString("screenType", "lock");
344 } 345 }
345 346
346 bool keyboard_driven_oobe = false; 347 bool keyboard_driven_oobe = false;
347 system::StatisticsProvider::GetInstance()->GetMachineFlag( 348 system::StatisticsProvider::GetInstance()->GetMachineFlag(
348 chrome::kOemKeyboardDrivenOobeKey, &keyboard_driven_oobe); 349 chromeos::kOemKeyboardDrivenOobeKey, &keyboard_driven_oobe);
349 localized_strings->SetString("highlightStrength", 350 localized_strings->SetString("highlightStrength",
350 keyboard_driven_oobe ? "strong" : "normal"); 351 keyboard_driven_oobe ? "strong" : "normal");
351 } 352 }
352 353
353 void OobeUI::InitializeScreenMaps() { 354 void OobeUI::InitializeScreenMaps() {
354 screen_names_.resize(SCREEN_UNKNOWN); 355 screen_names_.resize(SCREEN_UNKNOWN);
355 screen_names_[SCREEN_OOBE_NETWORK] = kScreenOobeNetwork; 356 screen_names_[SCREEN_OOBE_NETWORK] = kScreenOobeNetwork;
356 screen_names_[SCREEN_OOBE_EULA] = kScreenOobeEula; 357 screen_names_[SCREEN_OOBE_EULA] = kScreenOobeEula;
357 screen_names_[SCREEN_OOBE_UPDATE] = kScreenOobeUpdate; 358 screen_names_[SCREEN_OOBE_UPDATE] = kScreenOobeUpdate;
358 screen_names_[SCREEN_OOBE_ENROLLMENT] = kScreenOobeEnrollment; 359 screen_names_[SCREEN_OOBE_ENROLLMENT] = kScreenOobeEnrollment;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 void OobeUI::OnCurrentScreenChanged(const std::string& screen) { 424 void OobeUI::OnCurrentScreenChanged(const std::string& screen) {
424 if (screen_ids_.count(screen)) { 425 if (screen_ids_.count(screen)) {
425 current_screen_ = screen_ids_[screen]; 426 current_screen_ = screen_ids_[screen];
426 } else { 427 } else {
427 NOTREACHED() << "Screen should be registered in InitializeScreenMaps()"; 428 NOTREACHED() << "Screen should be registered in InitializeScreenMaps()";
428 current_screen_ = SCREEN_UNKNOWN; 429 current_screen_ = SCREEN_UNKNOWN;
429 } 430 }
430 } 431 }
431 432
432 } // namespace chromeos 433 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698