| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 // Returns true if this is an Event request, false if it's an UpdateCheck. | 139 // Returns true if this is an Event request, false if it's an UpdateCheck. |
| 140 bool IsEvent() const { return event_.get() != NULL; } | 140 bool IsEvent() const { return event_.get() != NULL; } |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 // If this is an update check request, initializes | 143 // If this is an update check request, initializes |
| 144 // |ping_active_days_| and |ping_roll_call_days_| to values that may | 144 // |ping_active_days_| and |ping_roll_call_days_| to values that may |
| 145 // be sent as pings to Omaha. | 145 // be sent as pings to Omaha. |
| 146 void InitPingDays(); | 146 void InitPingDays(); |
| 147 | 147 |
| 148 // Based on the perstitent preference store values, calculates the | 148 // Based on the persistent preference store values, calculates the |
| 149 // number of days since the last ping sent for |key|. | 149 // number of days since the last ping sent for |key|. |
| 150 int CalculatePingDays(const std::string& key); | 150 int CalculatePingDays(const std::string& key); |
| 151 | 151 |
| 152 // Access to the preferences store. | 152 // Access to the preferences store. |
| 153 PrefsInterface* prefs_; | 153 PrefsInterface* prefs_; |
| 154 | 154 |
| 155 // These are data that are passed in the request to the Omaha server. | 155 // These are data that are passed in the request to the Omaha server. |
| 156 const OmahaRequestParams& params_; | 156 const OmahaRequestParams& params_; |
| 157 | 157 |
| 158 // Pointer to the OmahaEvent info. This is an UpdateCheck request if NULL. | 158 // Pointer to the OmahaEvent info. This is an UpdateCheck request if NULL. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 169 // are sent to Omaha. | 169 // are sent to Omaha. |
| 170 int ping_active_days_; | 170 int ping_active_days_; |
| 171 int ping_roll_call_days_; | 171 int ping_roll_call_days_; |
| 172 | 172 |
| 173 DISALLOW_COPY_AND_ASSIGN(OmahaRequestAction); | 173 DISALLOW_COPY_AND_ASSIGN(OmahaRequestAction); |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 } // namespace chromeos_update_engine | 176 } // namespace chromeos_update_engine |
| 177 | 177 |
| 178 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_ACTION_H__ | 178 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_ACTION_H__ |
| OLD | NEW |