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

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

Issue 305153002: Fix for flag-file covering Rollback reset option. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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) && !CommandLine::ForCurrentProcess()->HasSwitch(
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
282 base::DictionaryValue params; 282 base::DictionaryValue params;
283 params.SetInteger("uiState", kErrorUIStateRollback); 283 params.SetInteger("uiState", kErrorUIStateRollback);
284 ShowScreen(OobeUI::kScreenErrorMessage, &params); 284 ShowScreen(OobeUI::kScreenErrorMessage, &params);
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698