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

Side by Side Diff: chrome/browser/chromeos/login/screens/reset_screen.cc

Issue 2705363002: cros: Move BaseScreenDelegate::ExitCodes into separate file, ScreenExitCode. (Closed)
Patch Set: Rebase Created 3 years, 9 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
OLDNEW
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/chromeos/login/screens/reset_screen.h" 5 #include "chrome/browser/chromeos/login/screens/reset_screen.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 void ResetScreen::OnCancel() { 139 void ResetScreen::OnCancel() {
140 if (context_.GetInteger( 140 if (context_.GetInteger(
141 kContextKeyScreenState, STATE_RESTART_REQUIRED) == STATE_REVERT_PROMISE) 141 kContextKeyScreenState, STATE_RESTART_REQUIRED) == STATE_REVERT_PROMISE)
142 return; 142 return;
143 // Hide Rollback view for the next show. 143 // Hide Rollback view for the next show.
144 if (context_.GetBoolean(kContextKeyIsRollbackAvailable) && 144 if (context_.GetBoolean(kContextKeyIsRollbackAvailable) &&
145 context_.GetBoolean(kContextKeyIsRollbackChecked)) 145 context_.GetBoolean(kContextKeyIsRollbackChecked))
146 OnToggleRollback(); 146 OnToggleRollback();
147 Finish(BaseScreenDelegate::RESET_CANCELED); 147 Finish(ScreenExitCode::RESET_CANCELED);
148 DBusThreadManager::Get()->GetUpdateEngineClient()->RemoveObserver(this); 148 DBusThreadManager::Get()->GetUpdateEngineClient()->RemoveObserver(this);
149 } 149 }
150 150
151 void ResetScreen::OnPowerwash() { 151 void ResetScreen::OnPowerwash() {
152 if (context_.GetInteger(kContextKeyScreenState, 0) != 152 if (context_.GetInteger(kContextKeyScreenState, 0) !=
153 STATE_POWERWASH_PROPOSAL) 153 STATE_POWERWASH_PROPOSAL)
154 return; 154 return;
155 155
156 GetContextEditor().SetBoolean(kContextKeyIsConfirmational, false); 156 GetContextEditor().SetBoolean(kContextKeyIsConfirmational, false);
157 CommitContextChanges(); 157 CommitContextChanges();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 reset::DIALOG_VIEW_TYPE_SIZE); 257 reset::DIALOG_VIEW_TYPE_SIZE);
258 258
259 GetContextEditor().SetBoolean(kContextKeyIsRollbackAvailable, can_rollback); 259 GetContextEditor().SetBoolean(kContextKeyIsRollbackAvailable, can_rollback);
260 } 260 }
261 261
262 ErrorScreen* ResetScreen::GetErrorScreen() { 262 ErrorScreen* ResetScreen::GetErrorScreen() {
263 return get_base_screen_delegate()->GetErrorScreen(); 263 return get_base_screen_delegate()->GetErrorScreen();
264 } 264 }
265 265
266 } // namespace chromeos 266 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698