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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
133 FROM_HERE, | 133 FROM_HERE, |
134 checkfile_closure, | 134 checkfile_closure, |
135 on_check_done)) { | 135 on_check_done)) { |
136 LOG(WARNING) << "Failed to check flag file for Rollback reset option"; | 136 LOG(WARNING) << "Failed to check flag file for Rollback reset option"; |
137 on_check_done.Run(); | 137 on_check_done.Run(); |
138 } | 138 } |
139 } | 139 } |
140 | 140 |
141 void ResetScreenHandler::OnRollbackFlagFileCheckDone( | 141 void ResetScreenHandler::OnRollbackFlagFileCheckDone( |
142 scoped_ptr<bool> file_exists) { | 142 scoped_ptr<bool> file_exists) { |
143 if (!file_exists && !CommandLine::ForCurrentProcess()->HasSwitch( | 143 if (!(*file_exists.get()) && !CommandLine::ForCurrentProcess()->HasSwitch( |
dzhioev (left Google)
2014/05/30 09:27:38
nit: .get() is not needed.
| |
144 switches::kEnableRollbackOption)) { | 144 switches::kEnableRollbackOption)) { |
145 rollback_available_ = false; | 145 rollback_available_ = false; |
146 ShowWithParams(); | 146 ShowWithParams(); |
147 } else if (!restart_required_ && reboot_was_requested_) { | 147 } else if (!restart_required_ && reboot_was_requested_) { |
148 // First exec after boot. | 148 // First exec after boot. |
149 PrefService* prefs = g_browser_process->local_state(); | 149 PrefService* prefs = g_browser_process->local_state(); |
150 rollback_available_ = prefs->GetBoolean(prefs::kRollbackRequested); | 150 rollback_available_ = prefs->GetBoolean(prefs::kRollbackRequested); |
151 ShowWithParams(); | 151 ShowWithParams(); |
152 } else { | 152 } else { |
153 chromeos::DBusThreadManager::Get()->GetUpdateEngineClient()-> | 153 chromeos::DBusThreadManager::Get()->GetUpdateEngineClient()-> |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
282 base::DictionaryValue params; | 282 base::DictionaryValue params; |
283 params.SetInteger("uiState", kErrorUIStateRollback); | 283 params.SetInteger("uiState", kErrorUIStateRollback); |
284 ShowScreen(OobeUI::kScreenErrorMessage, ¶ms); | 284 ShowScreen(OobeUI::kScreenErrorMessage, ¶ms); |
285 } else if (status.status == | 285 } else if (status.status == |
286 UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT) { | 286 UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT) { |
287 DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); | 287 DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); |
288 } | 288 } |
289 } | 289 } |
290 | 290 |
291 } // namespace chromeos | 291 } // namespace chromeos |
OLD | NEW |