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

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

Issue 374573006: Force enterprise enrollment flow upon detection of inconsistent state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/audio/sounds.h" 9 #include "ash/audio/sounds.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 if (show_app_launch_splash_screen) { 1199 if (show_app_launch_splash_screen) {
1200 const std::string& auto_launch_app_id = 1200 const std::string& auto_launch_app_id =
1201 chromeos::KioskAppManager::Get()->GetAutoLaunchApp(); 1201 chromeos::KioskAppManager::Get()->GetAutoLaunchApp();
1202 display_host->StartAppLaunch(auto_launch_app_id, 1202 display_host->StartAppLaunch(auto_launch_app_id,
1203 false /* diagnostic_mode */); 1203 false /* diagnostic_mode */);
1204 return; 1204 return;
1205 } 1205 }
1206 1206
1207 policy::BrowserPolicyConnectorChromeOS* connector = 1207 policy::BrowserPolicyConnectorChromeOS* connector =
1208 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 1208 g_browser_process->platform_part()->browser_policy_connector_chromeos();
1209 bool should_show_enrollment_screen = 1209 bool enrollment_screen_wanted =
1210 first_screen_name.empty() && oobe_complete && 1210 chromeos::WizardController::ShouldRecoverEnrollment() ||
1211 chromeos::WizardController::ShouldAutoStartEnrollment() && 1211 (chromeos::WizardController::ShouldAutoStartEnrollment() &&
1212 !connector->IsEnterpriseManaged(); 1212 oobe_complete &&
1213 if (should_show_enrollment_screen) { 1213 !connector->IsEnterpriseManaged());
1214 if (enrollment_screen_wanted && first_screen_name.empty()) {
1214 // Shows networks screen instead of enrollment screen to resume the 1215 // Shows networks screen instead of enrollment screen to resume the
1215 // interrupted auto start enrollment flow because enrollment screen does 1216 // interrupted auto start enrollment flow because enrollment screen does
1216 // not handle flaky network. See http://crbug.com/332572 1217 // not handle flaky network. See http://crbug.com/332572
1217 display_host->StartWizard(chromeos::WizardController::kNetworkScreenName, 1218 display_host->StartWizard(chromeos::WizardController::kNetworkScreenName,
1218 scoped_ptr<base::DictionaryValue>()); 1219 scoped_ptr<base::DictionaryValue>());
1219 return; 1220 return;
1220 } 1221 }
1221 1222
1222 if (StartupUtils::IsEulaAccepted()) { 1223 if (StartupUtils::IsEulaAccepted()) {
1223 DelayNetworkCall( 1224 DelayNetworkCall(
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 1276 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
1276 new locale_util::SwitchLanguageCallback( 1277 new locale_util::SwitchLanguageCallback(
1277 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); 1278 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
1278 1279
1279 // Load locale keyboards here. Hardware layout would be automatically enabled. 1280 // Load locale keyboards here. Hardware layout would be automatically enabled.
1280 locale_util::SwitchLanguage( 1281 locale_util::SwitchLanguage(
1281 locale, true, true /* login_layouts_only */, callback.Pass()); 1282 locale, true, true /* login_layouts_only */, callback.Pass());
1282 } 1283 }
1283 1284
1284 } // namespace chromeos 1285 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/startup_utils.cc ('k') | chrome/browser/chromeos/login/wizard_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698