OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/ui/webui/chromeos/login/enable_debugging_screen_handler
.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/enable_debugging_screen_handler
.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 237 } |
238 | 238 |
239 UpdateUIState(UI_STATE_DONE); | 239 UpdateUIState(UI_STATE_DONE); |
240 } | 240 } |
241 | 241 |
242 void EnableDebuggingScreenHandler::OnQueryDebuggingFeatures(bool success, | 242 void EnableDebuggingScreenHandler::OnQueryDebuggingFeatures(bool success, |
243 int features_flag) { | 243 int features_flag) { |
244 DVLOG(1) << "Enable-debugging-screen: OnQueryDebuggingFeatures" | 244 DVLOG(1) << "Enable-debugging-screen: OnQueryDebuggingFeatures" |
245 << ", success=" << success | 245 << ", success=" << success |
246 << ", features=" << features_flag; | 246 << ", features=" << features_flag; |
247 if (!success || features_flag == DebugDaemonClient::DEV_FEATURES_DISABLED) { | 247 if (!success || |
| 248 features_flag == debugd::DevFeatureFlag::DEV_FEATURES_DISABLED) { |
248 UpdateUIState(UI_STATE_ERROR); | 249 UpdateUIState(UI_STATE_ERROR); |
249 return; | 250 return; |
250 } | 251 } |
251 | 252 |
252 if ((features_flag & | 253 if ((features_flag & |
253 DebugDaemonClient::DEV_FEATURE_ROOTFS_VERIFICATION_REMOVED) == 0) { | 254 debugd::DevFeatureFlag::DEV_FEATURE_ROOTFS_VERIFICATION_REMOVED) == 0) { |
254 UpdateUIState(UI_STATE_REMOVE_PROTECTION); | 255 UpdateUIState(UI_STATE_REMOVE_PROTECTION); |
255 return; | 256 return; |
256 } | 257 } |
257 | 258 |
258 if ((features_flag & DebugDaemonClient::DEV_FEATURE_ALL_ENABLED) != | 259 if ((features_flag & DebugDaemonClient::DEV_FEATURE_ALL_ENABLED) != |
259 DebugDaemonClient::DEV_FEATURE_ALL_ENABLED) { | 260 DebugDaemonClient::DEV_FEATURE_ALL_ENABLED) { |
260 UpdateUIState(UI_STATE_SETUP); | 261 UpdateUIState(UI_STATE_SETUP); |
261 } else { | 262 } else { |
262 UpdateUIState(UI_STATE_DONE); | 263 UpdateUIState(UI_STATE_DONE); |
263 } | 264 } |
(...skipping 23 matching lines...) Expand all Loading... |
287 LoginWebDialog* dialog = new LoginWebDialog( | 288 LoginWebDialog* dialog = new LoginWebDialog( |
288 Profile::FromWebUI(web_ui()), | 289 Profile::FromWebUI(web_ui()), |
289 NULL, | 290 NULL, |
290 GetNativeWindow(), | 291 GetNativeWindow(), |
291 base::string16(), | 292 base::string16(), |
292 data_url); | 293 data_url); |
293 dialog->Show(); | 294 dialog->Show(); |
294 } | 295 } |
295 | 296 |
296 } // namespace chromeos | 297 } // namespace chromeos |
OLD | NEW |