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

Unified Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 6902107: Merge 82987, 83304 - make sure that OEM tab is shown even if first login is Guest (Closed) Base URL: svn://svn.chromium.org/chrome/branches/742/src/
Patch Set: Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | chrome/browser/chromeos/mock_system_access.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/wizard_controller.cc
===================================================================
--- chrome/browser/chromeos/login/wizard_controller.cc (revision 83304)
+++ chrome/browser/chromeos/login/wizard_controller.cc (working copy)
@@ -21,7 +21,6 @@
#include "chrome/browser/chromeos/customization_document.h"
#include "chrome/browser/chromeos/language_preferences.h"
#include "chrome/browser/chromeos/login/account_screen.h"
-#include "chrome/browser/chromeos/login/apply_services_customization.h"
#include "chrome/browser/chromeos/login/enterprise_enrollment_screen.h"
#include "chrome/browser/chromeos/login/eula_view.h"
#include "chrome/browser/chromeos/login/existing_user_controller.h"
@@ -178,13 +177,6 @@
DISALLOW_COPY_AND_ASSIGN(ContentView);
};
-// Returns true if startup manifest defines valid registration URL.
-bool IsRegistrationScreenValid(
- const chromeos::StartupCustomizationDocument* startup_manifest) {
- return startup_manifest != NULL &&
- GURL(startup_manifest->registration_url()).is_valid();
-}
-
// Saves boolean "Local State" preference and forces its persistence to disk.
void SaveBoolPreferenceForced(const char* pref_name, bool value) {
PrefService* prefs = g_browser_process->local_state();
@@ -274,12 +266,6 @@
DCHECK(!contents_);
first_screen_name_ = first_screen_name;
- // When device is not registered yet we need to load startup manifest as well.
- // In case of OOBE (network-EULA-update) manifest has been loaded in
- // ShowLoginWizard().
- if (IsOobeCompleted() && !IsDeviceRegistered())
- SetCustomization(chromeos::LoadStartupManifest());
-
contents_ = new ContentView();
bool oobe_complete = IsOobeCompleted();
@@ -415,7 +401,7 @@
}
void WizardController::ShowRegistrationScreen() {
- if (!IsRegistrationScreenValid(GetCustomization())) {
+ if (!IsRegisterScreenDefined()) {
VLOG(1) << "Skipping registration screen: manifest not defined or invalid "
"URL.";
OnRegistrationSkipped();
@@ -442,16 +428,6 @@
SetCurrentScreen(GetEnterpriseEnrollmentScreen());
}
-void WizardController::SetCustomization(
- const chromeos::StartupCustomizationDocument* customization) {
- customization_.reset(customization);
-}
-
-const chromeos::StartupCustomizationDocument*
- WizardController::GetCustomization() const {
- return customization_.get();
-}
-
void WizardController::SkipRegistration() {
if (current_screen_ == GetRegistrationScreen())
OnRegistrationSkipped();
@@ -812,14 +788,10 @@
// static
bool WizardController::IsRegisterScreenDefined() {
- const chromeos::StartupCustomizationDocument* manifest = NULL;
- // This method will be called from ExistingUserController too
- // when Wizard instance doesn't exist.
- if (default_controller())
- manifest = default_controller()->GetCustomization();
- else
- manifest = chromeos::LoadStartupManifest();
- return IsRegistrationScreenValid(manifest);
+ const chromeos::StartupCustomizationDocument* manifest =
+ chromeos::StartupCustomizationDocument::GetInstance();
+ return manifest->IsReady() &&
+ GURL(manifest->registration_url()).is_valid();
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | chrome/browser/chromeos/mock_system_access.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698