| OLD | NEW |
| 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/ui/webui/chromeos/login/reset_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/reset_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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/prefs/pref_registry_simple.h" | 11 #include "base/prefs/pref_registry_simple.h" |
| 12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/chromeos/login/help_app_launcher.h" | 15 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
| 16 #include "chrome/browser/chromeos/reset/metrics.h" | 16 #include "chrome/browser/chromeos/reset/metrics.h" |
| 17 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 17 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 19 #include "chrome/grit/chromium_strings.h" |
| 20 #include "chrome/grit/generated_resources.h" |
| 19 #include "chromeos/chromeos_switches.h" | 21 #include "chromeos/chromeos_switches.h" |
| 20 #include "chromeos/dbus/dbus_thread_manager.h" | 22 #include "chromeos/dbus/dbus_thread_manager.h" |
| 21 #include "chromeos/dbus/power_manager_client.h" | 23 #include "chromeos/dbus/power_manager_client.h" |
| 22 #include "chromeos/dbus/session_manager_client.h" | 24 #include "chromeos/dbus/session_manager_client.h" |
| 23 #include "chromeos/dbus/update_engine_client.h" | 25 #include "chromeos/dbus/update_engine_client.h" |
| 24 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
| 25 #include "grit/browser_resources.h" | 27 #include "grit/browser_resources.h" |
| 26 #include "grit/chromium_strings.h" | |
| 27 #include "grit/generated_resources.h" | |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 const char kJsScreenPath[] = "login.ResetScreen"; | 31 const char kJsScreenPath[] = "login.ResetScreen"; |
| 32 | 32 |
| 33 // Reset screen id. | 33 // Reset screen id. |
| 34 const char kResetScreen[] = "reset"; | 34 const char kResetScreen[] = "reset"; |
| 35 | 35 |
| 36 const int kErrorUIStateRollback = 7; | 36 const int kErrorUIStateRollback = 7; |
| 37 | 37 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 base::DictionaryValue params; | 263 base::DictionaryValue params; |
| 264 params.SetInteger("uiState", kErrorUIStateRollback); | 264 params.SetInteger("uiState", kErrorUIStateRollback); |
| 265 ShowScreen(OobeUI::kScreenErrorMessage, ¶ms); | 265 ShowScreen(OobeUI::kScreenErrorMessage, ¶ms); |
| 266 } else if (status.status == | 266 } else if (status.status == |
| 267 UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT) { | 267 UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT) { |
| 268 DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); | 268 DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); |
| 269 } | 269 } |
| 270 } | 270 } |
| 271 | 271 |
| 272 } // namespace chromeos | 272 } // namespace chromeos |
| OLD | NEW |