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

Side by Side Diff: update_attempter.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 | « action_processor.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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // DownloadActionDelegate method 83 // DownloadActionDelegate method
84 void BytesReceived(uint64_t bytes_received, uint64_t total); 84 void BytesReceived(uint64_t bytes_received, uint64_t total);
85 85
86 private: 86 private:
87 // Sets the status to the given status and notifies a status update 87 // Sets the status to the given status and notifies a status update
88 // over dbus. 88 // over dbus.
89 void SetStatusAndNotify(UpdateStatus status); 89 void SetStatusAndNotify(UpdateStatus status);
90 90
91 // Creates an error event object in |error_event_| to be included in 91 // Creates an error event object in |error_event_| to be included in
92 // an OmahaRequestAction once the current action processor is done. 92 // an OmahaRequestAction once the current action processor is done.
93 void CreatePendingErrorEvent(ActionExitCode code); 93 void CreatePendingErrorEvent(AbstractAction* action, ActionExitCode code);
94 94
95 // If there's a pending error event allocated in |error_event_|, 95 // If there's a pending error event allocated in |error_event_|,
96 // schedules an OmahaRequestAction with that event in the current 96 // schedules an OmahaRequestAction with that event in the current
97 // processor, clears the pending event, updates the status and 97 // processor, clears the pending event, updates the status and
98 // returns true. Returns false otherwise. 98 // returns true. Returns false otherwise.
99 bool ScheduleErrorEventAction(); 99 bool ScheduleErrorEventAction();
100 100
101 struct timespec last_notify_time_; 101 struct timespec last_notify_time_;
102 102
103 std::vector<std::tr1::shared_ptr<AbstractAction> > actions_; 103 std::vector<std::tr1::shared_ptr<AbstractAction> > actions_;
(...skipping 21 matching lines...) Expand all
125 125
126 // Device paramaters common to all Omaha requests. 126 // Device paramaters common to all Omaha requests.
127 OmahaRequestDeviceParams omaha_request_params_; 127 OmahaRequestDeviceParams omaha_request_params_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(UpdateAttempter); 129 DISALLOW_COPY_AND_ASSIGN(UpdateAttempter);
130 }; 130 };
131 131
132 } // namespace chromeos_update_engine 132 } // namespace chromeos_update_engine
133 133
134 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__ 134 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__
OLDNEW
« no previous file with comments | « action_processor.h ('k') | update_attempter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698