| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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__ |
| OLD | NEW |