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

Side by Side Diff: action_processor.h

Issue 2819059: Narrow down to one generic error per action. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Rename SwitchToActionSpecificCode to GetErrorCodeForAction. Created 10 years, 5 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 | update_attempter.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) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 11
12 // The structure of these classes (Action, ActionPipe, ActionProcessor, etc.) 12 // The structure of these classes (Action, ActionPipe, ActionProcessor, etc.)
13 // is based on the KSAction* classes from the Google Update Engine code at 13 // is based on the KSAction* classes from the Google Update Engine code at
14 // http://code.google.com/p/update-engine/ . The author of this file sends 14 // http://code.google.com/p/update-engine/ . The author of this file sends
15 // a big thanks to that team for their high quality design, implementation, 15 // a big thanks to that team for their high quality design, implementation,
16 // and documentation. 16 // and documentation.
17 17
18 // See action.h for an overview of this class and other other Action* classes. 18 // See action.h for an overview of this class and other other Action* classes.
19 19
20 // An ActionProcessor keeps a queue of Actions and processes them in order. 20 // An ActionProcessor keeps a queue of Actions and processes them in order.
21 21
22 namespace chromeos_update_engine { 22 namespace chromeos_update_engine {
23 23
24 // Action exit codes. 24 // Action exit codes.
25 enum ActionExitCode { 25 enum ActionExitCode {
26 kActionCodeSuccess = 0, 26 kActionCodeSuccess = 0,
27 kActionCodeError = 1, 27 kActionCodeError = 1,
28 kActionCodeInstallDeviceOpenError = 2, 28 kActionCodeOmahaRequestError = 2,
29 kActionCodeKernelDeviceOpenError = 3, 29 kActionCodeOmahaResponseHandlerError = 3,
30 kActionCodeDownloadTransferError = 4, 30 kActionCodeFilesystemCopierError = 4,
31 kActionCodeDownloadHashMismatchError = 5, 31 kActionCodePostinstallRunnerError = 5,
32 kActionCodeSetBootableFlagError = 6,
33 kActionCodeInstallDeviceOpenError = 7,
34 kActionCodeKernelDeviceOpenError = 8,
35 kActionCodeDownloadTransferError = 9,
36 kActionCodeDownloadHashMismatchError = 10,
32 }; 37 };
33 38
34 class AbstractAction; 39 class AbstractAction;
35 class ActionProcessorDelegate; 40 class ActionProcessorDelegate;
36 41
37 class ActionProcessor { 42 class ActionProcessor {
38 public: 43 public:
39 ActionProcessor(); 44 ActionProcessor();
40 45
41 ~ActionProcessor(); 46 ~ActionProcessor();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Called whenever an action has finished processing, either successfully 105 // Called whenever an action has finished processing, either successfully
101 // or otherwise. 106 // or otherwise.
102 virtual void ActionCompleted(ActionProcessor* processor, 107 virtual void ActionCompleted(ActionProcessor* processor,
103 AbstractAction* action, 108 AbstractAction* action,
104 ActionExitCode code) {} 109 ActionExitCode code) {}
105 }; 110 };
106 111
107 } // namespace chromeos_update_engine 112 } // namespace chromeos_update_engine
108 113
109 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__ 114 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__
OLDNEW
« no previous file with comments | « no previous file | update_attempter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698