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

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

Issue 614643003: Rollback feature is taken out of the flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « chrome/browser/chromeos/login/reset_browsertest.cc ('k') | chromeos/chromeos_switches.h » ('j') | 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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 PrefService* prefs = g_browser_process->local_state(); 95 PrefService* prefs = g_browser_process->local_state();
96 restart_required_ = !CommandLine::ForCurrentProcess()->HasSwitch( 96 restart_required_ = !CommandLine::ForCurrentProcess()->HasSwitch(
97 switches::kFirstExecAfterBoot); 97 switches::kFirstExecAfterBoot);
98 98
99 reboot_was_requested_ = false; 99 reboot_was_requested_ = false;
100 rollback_available_ = false; 100 rollback_available_ = false;
101 preparing_for_rollback_ = false; 101 preparing_for_rollback_ = false;
102 if (!restart_required_) // First exec after boot. 102 if (!restart_required_) // First exec after boot.
103 reboot_was_requested_ = prefs->GetBoolean(prefs::kFactoryResetRequested); 103 reboot_was_requested_ = prefs->GetBoolean(prefs::kFactoryResetRequested);
104 104
105 if (!CommandLine::ForCurrentProcess()->HasSwitch( 105 if (CommandLine::ForCurrentProcess()->HasSwitch(
106 switches::kEnableRollbackOption)) { 106 switches::kDisableRollbackOption)) {
107 rollback_available_ = false; 107 rollback_available_ = false;
108 ShowWithParams(); 108 ShowWithParams();
109 } else if (!restart_required_ && reboot_was_requested_) { 109 } else if (!restart_required_ && reboot_was_requested_) {
110 // First exec after boot. 110 // First exec after boot.
111 chromeos::DBusThreadManager::Get()->GetUpdateEngineClient()-> 111 chromeos::DBusThreadManager::Get()->GetUpdateEngineClient()->
112 CanRollbackCheck(base::Bind(&ResetScreenHandler::OnRollbackCheck, 112 CanRollbackCheck(base::Bind(&ResetScreenHandler::OnRollbackCheck,
113 weak_ptr_factory_.GetWeakPtr())); 113 weak_ptr_factory_.GetWeakPtr()));
114 } else { 114 } else {
115 // Will require restart. 115 // Will require restart.
116 ShowWithParams(); 116 ShowWithParams();
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 base::DictionaryValue params; 289 base::DictionaryValue params;
290 params.SetInteger("uiState", kErrorUIStateRollback); 290 params.SetInteger("uiState", kErrorUIStateRollback);
291 ShowScreen(OobeUI::kScreenErrorMessage, &params); 291 ShowScreen(OobeUI::kScreenErrorMessage, &params);
292 } else if (status.status == 292 } else if (status.status ==
293 UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT) { 293 UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT) {
294 DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); 294 DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart();
295 } 295 }
296 } 296 }
297 297
298 } // namespace chromeos 298 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/reset_browsertest.cc ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698