| 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_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 | 9 |
| 10 #include <tr1/memory> | 10 #include <tr1/memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include <base/time.h> |
| 14 #include <glib.h> | 15 #include <glib.h> |
| 15 #include <gtest/gtest_prod.h> // for FRIEND_TEST | 16 #include <gtest/gtest_prod.h> // for FRIEND_TEST |
| 16 | 17 |
| 17 #include "base/time.h" | |
| 18 #include "update_engine/action_processor.h" | 18 #include "update_engine/action_processor.h" |
| 19 #include "update_engine/download_action.h" | 19 #include "update_engine/download_action.h" |
| 20 #include "update_engine/omaha_request_params.h" | 20 #include "update_engine/omaha_request_params.h" |
| 21 #include "update_engine/omaha_response_handler_action.h" | 21 #include "update_engine/omaha_response_handler_action.h" |
| 22 | 22 |
| 23 class MetricsLibraryInterface; | 23 class MetricsLibraryInterface; |
| 24 struct UpdateEngineService; | 24 struct UpdateEngineService; |
| 25 | 25 |
| 26 namespace chromeos_update_engine { | 26 namespace chromeos_update_engine { |
| 27 | 27 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 162 |
| 163 // Pointer to the UMA metrics collection library. | 163 // Pointer to the UMA metrics collection library. |
| 164 MetricsLibraryInterface* metrics_lib_; | 164 MetricsLibraryInterface* metrics_lib_; |
| 165 | 165 |
| 166 // The current UpdateCheckScheduler to notify of state transitions. | 166 // The current UpdateCheckScheduler to notify of state transitions. |
| 167 UpdateCheckScheduler* update_check_scheduler_; | 167 UpdateCheckScheduler* update_check_scheduler_; |
| 168 | 168 |
| 169 // Pending error event, if any. | 169 // Pending error event, if any. |
| 170 scoped_ptr<OmahaEvent> error_event_; | 170 scoped_ptr<OmahaEvent> error_event_; |
| 171 | 171 |
| 172 // HTTP server response code from the last HTTP request action. |
| 172 int http_response_code_; | 173 int http_response_code_; |
| 173 | 174 |
| 174 // Current process priority. | 175 // Current process priority. |
| 175 utils::ProcessPriority priority_; | 176 utils::ProcessPriority priority_; |
| 176 | 177 |
| 177 // The process priority management timeout source. | 178 // The process priority management timeout source. |
| 178 GSource* manage_priority_source_; | 179 GSource* manage_priority_source_; |
| 179 | 180 |
| 180 // Set to true if an update download is active (and BytesReceived | 181 // Set to true if an update download is active (and BytesReceived |
| 181 // will be called), set to false otherwise. | 182 // will be called), set to false otherwise. |
| 182 bool download_active_; | 183 bool download_active_; |
| 183 | 184 |
| 184 // For status: | 185 // For status: |
| 185 UpdateStatus status_; | 186 UpdateStatus status_; |
| 186 double download_progress_; | 187 double download_progress_; |
| 187 int64_t last_checked_time_; | 188 int64_t last_checked_time_; |
| 188 std::string new_version_; | 189 std::string new_version_; |
| 189 int64_t new_size_; | 190 int64_t new_size_; |
| 190 | 191 |
| 191 // Device paramaters common to all Omaha requests. | 192 // Device paramaters common to all Omaha requests. |
| 192 OmahaRequestDeviceParams omaha_request_params_; | 193 OmahaRequestDeviceParams omaha_request_params_; |
| 193 | 194 |
| 194 DISALLOW_COPY_AND_ASSIGN(UpdateAttempter); | 195 DISALLOW_COPY_AND_ASSIGN(UpdateAttempter); |
| 195 }; | 196 }; |
| 196 | 197 |
| 197 } // namespace chromeos_update_engine | 198 } // namespace chromeos_update_engine |
| 198 | 199 |
| 199 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__ | 200 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_H__ |
| OLD | NEW |