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

Side by Side Diff: action_processor.h

Issue 3046007: Add and emit download action error codes. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: 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 | download_action.cc » ('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,
29 kActionCodeKernelDeviceOpenError = 3,
30 kActionCodeDownloadTransferError = 4,
31 kActionCodeDownloadHashMismatchError = 5,
28 }; 32 };
29 33
30 class AbstractAction; 34 class AbstractAction;
31 class ActionProcessorDelegate; 35 class ActionProcessorDelegate;
32 36
33 class ActionProcessor { 37 class ActionProcessor {
34 public: 38 public:
35 ActionProcessor(); 39 ActionProcessor();
36 40
37 ~ActionProcessor(); 41 ~ActionProcessor();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Called whenever an action has finished processing, either successfully 100 // Called whenever an action has finished processing, either successfully
97 // or otherwise. 101 // or otherwise.
98 virtual void ActionCompleted(ActionProcessor* processor, 102 virtual void ActionCompleted(ActionProcessor* processor,
99 AbstractAction* action, 103 AbstractAction* action,
100 ActionExitCode code) {} 104 ActionExitCode code) {}
101 }; 105 };
102 106
103 } // namespace chromeos_update_engine 107 } // namespace chromeos_update_engine
104 108
105 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__ 109 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__
OLDNEW
« no previous file with comments | « no previous file | download_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698