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

Side by Side Diff: omaha_request_action.h

Issue 3215006: AU: Implement exponential back off for 500 and 503 HTTP response codes. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: elaborate on the CHECK Created 10 years, 3 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 | « main.cc ('k') | 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_OMAHA_REQUEST_ACTION_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_ACTION_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_ACTION_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_ACTION_H__
7 7
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 OmahaRequestAction(PrefsInterface* prefs, 120 OmahaRequestAction(PrefsInterface* prefs,
121 const OmahaRequestParams& params, 121 const OmahaRequestParams& params,
122 OmahaEvent* event, 122 OmahaEvent* event,
123 HttpFetcher* http_fetcher); 123 HttpFetcher* http_fetcher);
124 virtual ~OmahaRequestAction(); 124 virtual ~OmahaRequestAction();
125 typedef ActionTraits<OmahaRequestAction>::InputObjectType InputObjectType; 125 typedef ActionTraits<OmahaRequestAction>::InputObjectType InputObjectType;
126 typedef ActionTraits<OmahaRequestAction>::OutputObjectType OutputObjectType; 126 typedef ActionTraits<OmahaRequestAction>::OutputObjectType OutputObjectType;
127 void PerformAction(); 127 void PerformAction();
128 void TerminateProcessing(); 128 void TerminateProcessing();
129 129
130 int GetHTTPResponseCode() { return http_fetcher_->http_response_code(); }
131
130 // Debugging/logging 132 // Debugging/logging
131 static std::string StaticType() { return "OmahaRequestAction"; } 133 static std::string StaticType() { return "OmahaRequestAction"; }
132 std::string Type() const { return StaticType(); } 134 std::string Type() const { return StaticType(); }
133 135
134 // Delegate methods (see http_fetcher.h) 136 // Delegate methods (see http_fetcher.h)
135 virtual void ReceivedBytes(HttpFetcher *fetcher, 137 virtual void ReceivedBytes(HttpFetcher *fetcher,
136 const char* bytes, int length); 138 const char* bytes, int length);
137 virtual void TransferComplete(HttpFetcher *fetcher, bool successful); 139 virtual void TransferComplete(HttpFetcher *fetcher, bool successful);
138 140
139 // Returns true if this is an Event request, false if it's an UpdateCheck. 141 // Returns true if this is an Event request, false if it's an UpdateCheck.
(...skipping 29 matching lines...) Expand all
169 // are sent to Omaha. 171 // are sent to Omaha.
170 int ping_active_days_; 172 int ping_active_days_;
171 int ping_roll_call_days_; 173 int ping_roll_call_days_;
172 174
173 DISALLOW_COPY_AND_ASSIGN(OmahaRequestAction); 175 DISALLOW_COPY_AND_ASSIGN(OmahaRequestAction);
174 }; 176 };
175 177
176 } // namespace chromeos_update_engine 178 } // namespace chromeos_update_engine
177 179
178 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_ACTION_H__ 180 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_ACTION_H__
OLDNEW
« no previous file with comments | « main.cc ('k') | update_attempter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698