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

Side by Side Diff: update_attempter.h

Issue 3022008: For actions, switch bool success into an exit code. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: switch to all positive error codes. 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 | « test_utils.h ('k') | update_attempter.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_UPDATE_ATTEMPTER_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__
7 7
8 #include <time.h> 8 #include <time.h>
9 #include <tr1/memory> 9 #include <tr1/memory>
10 #include <string> 10 #include <string>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 new_version_("0.0.0.0"), 43 new_version_("0.0.0.0"),
44 new_size_(0) { 44 new_size_(0) {
45 last_notify_time_.tv_sec = 0; 45 last_notify_time_.tv_sec = 0;
46 last_notify_time_.tv_nsec = 0; 46 last_notify_time_.tv_nsec = 0;
47 if (utils::FileExists(kUpdateCompletedMarker)) 47 if (utils::FileExists(kUpdateCompletedMarker))
48 status_ = UPDATE_STATUS_UPDATED_NEED_REBOOT; 48 status_ = UPDATE_STATUS_UPDATED_NEED_REBOOT;
49 } 49 }
50 void Update(); 50 void Update();
51 51
52 // ActionProcessorDelegate methods: 52 // ActionProcessorDelegate methods:
53 void ProcessingDone(const ActionProcessor* processor, bool success); 53 void ProcessingDone(const ActionProcessor* processor, ActionExitCode code);
54 void ProcessingStopped(const ActionProcessor* processor); 54 void ProcessingStopped(const ActionProcessor* processor);
55 void ActionCompleted(ActionProcessor* processor, 55 void ActionCompleted(ActionProcessor* processor,
56 AbstractAction* action, 56 AbstractAction* action,
57 bool success); 57 ActionExitCode code);
58 58
59 // Stop updating. An attempt will be made to record status to the disk 59 // Stop updating. An attempt will be made to record status to the disk
60 // so that updates can be resumed later. 60 // so that updates can be resumed later.
61 void Terminate(); 61 void Terminate();
62 62
63 // Try to resume from a previously Terminate()d update. 63 // Try to resume from a previously Terminate()d update.
64 void ResumeUpdating(); 64 void ResumeUpdating();
65 65
66 // Returns the current status in the out params. Returns true on success. 66 // Returns the current status in the out params. Returns true on success.
67 bool GetStatus(int64_t* last_checked_time, 67 bool GetStatus(int64_t* last_checked_time,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 // Device paramaters common to all Omaha requests. 106 // Device paramaters common to all Omaha requests.
107 OmahaRequestDeviceParams omaha_request_params_; 107 OmahaRequestDeviceParams omaha_request_params_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(UpdateAttempter); 109 DISALLOW_COPY_AND_ASSIGN(UpdateAttempter);
110 }; 110 };
111 111
112 } // namespace chromeos_update_engine 112 } // namespace chromeos_update_engine
113 113
114 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__ 114 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__
OLDNEW
« no previous file with comments | « test_utils.h ('k') | update_attempter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698