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

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

Issue 2700783002: s/\bArc\b/ARC/g for ARC related code. (Closed)
Patch Set: Address ARC++ Created 3 years, 10 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
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/chromeos/login/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 523
524 void WizardController::ShowEnableDebuggingScreen() { 524 void WizardController::ShowEnableDebuggingScreen() {
525 VLOG(1) << "Showing enable developer features screen."; 525 VLOG(1) << "Showing enable developer features screen.";
526 SetStatusAreaVisible(false); 526 SetStatusAreaVisible(false);
527 SetCurrentScreen(GetScreen(OobeScreen::SCREEN_OOBE_ENABLE_DEBUGGING)); 527 SetCurrentScreen(GetScreen(OobeScreen::SCREEN_OOBE_ENABLE_DEBUGGING));
528 } 528 }
529 529
530 void WizardController::ShowTermsOfServiceScreen() { 530 void WizardController::ShowTermsOfServiceScreen() {
531 // Only show the Terms of Service when logging into a public account and Terms 531 // Only show the Terms of Service when logging into a public account and Terms
532 // of Service have been specified through policy. In all other cases, advance 532 // of Service have been specified through policy. In all other cases, advance
533 // to the Arc opt-in screen immediately. 533 // to the ARC opt-in screen immediately.
534 if (!user_manager::UserManager::Get()->IsLoggedInAsPublicAccount() || 534 if (!user_manager::UserManager::Get()->IsLoggedInAsPublicAccount() ||
535 !ProfileManager::GetActiveUserProfile()->GetPrefs()->IsManagedPreference( 535 !ProfileManager::GetActiveUserProfile()->GetPrefs()->IsManagedPreference(
536 prefs::kTermsOfServiceURL)) { 536 prefs::kTermsOfServiceURL)) {
537 ShowArcTermsOfServiceScreen(); 537 ShowArcTermsOfServiceScreen();
538 return; 538 return;
539 } 539 }
540 540
541 VLOG(1) << "Showing Terms of Service screen."; 541 VLOG(1) << "Showing Terms of Service screen.";
542 SetStatusAreaVisible(true); 542 SetStatusAreaVisible(true);
543 SetCurrentScreen(GetScreen(OobeScreen::SCREEN_TERMS_OF_SERVICE)); 543 SetCurrentScreen(GetScreen(OobeScreen::SCREEN_TERMS_OF_SERVICE));
544 } 544 }
545 545
546 void WizardController::ShowArcTermsOfServiceScreen() { 546 void WizardController::ShowArcTermsOfServiceScreen() {
547 bool show_arc_terms = false; 547 bool show_arc_terms = false;
548 const Profile* profile = ProfileManager::GetActiveUserProfile(); 548 const Profile* profile = ProfileManager::GetActiveUserProfile();
549 549
550 const base::CommandLine* command_line = 550 const base::CommandLine* command_line =
551 base::CommandLine::ForCurrentProcess(); 551 base::CommandLine::ForCurrentProcess();
552 if (!command_line->HasSwitch(chromeos::switches::kEnableArcOOBEOptIn)) { 552 if (!command_line->HasSwitch(chromeos::switches::kEnableArcOOBEOptIn)) {
553 VLOG(1) << "Skip Arc Terms of Service screen because Arc OOBE OptIn is " 553 VLOG(1) << "Skip ARC Terms of Service screen because ARC OOBE OptIn is "
554 << "disabled."; 554 << "disabled.";
555 } else if (!user_manager::UserManager::Get()->IsUserLoggedIn()) { 555 } else if (!user_manager::UserManager::Get()->IsUserLoggedIn()) {
556 VLOG(1) << "Skip Arc Terms of Service screen because user is not " 556 VLOG(1) << "Skip ARC Terms of Service screen because user is not "
557 << "logged in."; 557 << "logged in.";
558 } else if (!arc::IsArcAllowedForProfile(profile)) { 558 } else if (!arc::IsArcAllowedForProfile(profile)) {
559 VLOG(1) << "Skip Arc Terms of Service screen because Arc is not allowed."; 559 VLOG(1) << "Skip ARC Terms of Service screen because ARC is not allowed.";
560 } else if (profile->GetPrefs()->IsManagedPreference(prefs::kArcEnabled) && 560 } else if (profile->GetPrefs()->IsManagedPreference(prefs::kArcEnabled) &&
561 !profile->GetPrefs()->GetBoolean(prefs::kArcEnabled)) { 561 !profile->GetPrefs()->GetBoolean(prefs::kArcEnabled)) {
562 VLOG(1) << "Skip Arc Terms of Service screen because Arc is disabled."; 562 VLOG(1) << "Skip ARC Terms of Service screen because ARC is disabled.";
563 } else { 563 } else {
564 show_arc_terms = true; 564 show_arc_terms = true;
565 } 565 }
566 566
567 if (show_arc_terms) { 567 if (show_arc_terms) {
568 VLOG(1) << "Showing Arc Terms of Service screen."; 568 VLOG(1) << "Showing ARC Terms of Service screen.";
569 SetStatusAreaVisible(true); 569 SetStatusAreaVisible(true);
570 SetCurrentScreen(GetScreen(OobeScreen::SCREEN_ARC_TERMS_OF_SERVICE)); 570 SetCurrentScreen(GetScreen(OobeScreen::SCREEN_ARC_TERMS_OF_SERVICE));
571 } else { 571 } else {
572 ShowUserImageScreen(); 572 ShowUserImageScreen();
573 } 573 }
574 } 574 }
575 575
576 void WizardController::ShowWrongHWIDScreen() { 576 void WizardController::ShowWrongHWIDScreen() {
577 VLOG(1) << "Showing wrong HWID screen."; 577 VLOG(1) << "Showing wrong HWID screen.";
578 SetStatusAreaVisible(false); 578 SetStatusAreaVisible(false);
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; 1508 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT;
1509 } 1509 }
1510 1510
1511 EnrollmentScreen* screen = EnrollmentScreen::Get(this); 1511 EnrollmentScreen* screen = EnrollmentScreen::Get(this);
1512 screen->SetParameters(effective_config, shark_controller_.get()); 1512 screen->SetParameters(effective_config, shark_controller_.get());
1513 SetStatusAreaVisible(true); 1513 SetStatusAreaVisible(true);
1514 SetCurrentScreen(screen); 1514 SetCurrentScreen(screen);
1515 } 1515 }
1516 1516
1517 } // namespace chromeos 1517 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/arc_kiosk_controller.cc ('k') | chrome/browser/chromeos/login/wizard_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698