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

Side by Side Diff: chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.cc

Issue 23532034: Postpone loading about:flags ui until the certificates have been loaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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/chromeos/kiosk_mode/kiosk_mode_settings.h" 5 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 base::Unretained(this))); 170 base::Unretained(this)));
171 } 171 }
172 } 172 }
173 is_kiosk_mode_ = false; 173 is_kiosk_mode_ = false;
174 } 174 }
175 175
176 KioskModeSettings::~KioskModeSettings() { 176 KioskModeSettings::~KioskModeSettings() {
177 } 177 }
178 178
179 void KioskModeSettings::VerifyModeIsKnown( 179 void KioskModeSettings::VerifyModeIsKnown(
180 DeviceSettingsService::OwnershipStatus status, 180 DeviceSettingsService::OwnershipStatus status) {
181 bool is_owner) {
182 if (status != DeviceSettingsService::OWNERSHIP_TAKEN) 181 if (status != DeviceSettingsService::OWNERSHIP_TAKEN)
183 return; 182 return;
184 183
185 if (g_browser_process) { 184 if (g_browser_process) {
186 policy::BrowserPolicyConnector* bpc = 185 policy::BrowserPolicyConnector* bpc =
187 g_browser_process->browser_policy_connector(); 186 g_browser_process->browser_policy_connector();
188 policy::DeviceMode device_mode = bpc->GetDeviceMode(); 187 policy::DeviceMode device_mode = bpc->GetDeviceMode();
189 // We retry asking for the mode until it becomes known. 188 // We retry asking for the mode until it becomes known.
190 switch (device_mode) { 189 switch (device_mode) {
191 case policy::DEVICE_MODE_PENDING: 190 case policy::DEVICE_MODE_PENDING:
192 content::BrowserThread::PostDelayedTask( 191 content::BrowserThread::PostDelayedTask(
193 content::BrowserThread::UI, FROM_HERE, 192 content::BrowserThread::UI, FROM_HERE,
194 base::Bind(&KioskModeSettings::VerifyModeIsKnown, 193 base::Bind(&KioskModeSettings::VerifyModeIsKnown,
195 base::Unretained(this), status, is_owner), 194 base::Unretained(this), status),
196 base::TimeDelta::FromMilliseconds(kDeviceModeFetchRetryDelayMs)); 195 base::TimeDelta::FromMilliseconds(kDeviceModeFetchRetryDelayMs));
197 break; 196 break;
198 case policy::DEVICE_MODE_RETAIL_KIOSK: 197 case policy::DEVICE_MODE_RETAIL_KIOSK:
199 chrome::ExitCleanly(); 198 chrome::ExitCleanly();
200 break; 199 break;
201 default: 200 default:
202 break; 201 break;
203 } 202 }
204 } 203 }
205 } 204 }
206 205
207 206
208 } // namespace chromeos 207 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h ('k') | chrome/browser/chromeos/login/existing_user_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698