| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium 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 COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ |
| 6 #define COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // the behavior of the update client, and the other class controls the | 32 // the behavior of the update client, and the other class controls the |
| 33 // behavior of the component updater. | 33 // behavior of the component updater. |
| 34 class Configurator : public base::RefCountedThreadSafe<Configurator> { | 34 class Configurator : public base::RefCountedThreadSafe<Configurator> { |
| 35 public: | 35 public: |
| 36 // Delay in seconds from calling Start() to the first update check. | 36 // Delay in seconds from calling Start() to the first update check. |
| 37 virtual int InitialDelay() const = 0; | 37 virtual int InitialDelay() const = 0; |
| 38 | 38 |
| 39 // Delay in seconds to every subsequent update check. 0 means don't check. | 39 // Delay in seconds to every subsequent update check. 0 means don't check. |
| 40 virtual int NextCheckDelay() const = 0; | 40 virtual int NextCheckDelay() const = 0; |
| 41 | 41 |
| 42 // Delay in seconds from each task step. Used to smooth out CPU/IO usage. | |
| 43 virtual int StepDelay() const = 0; | |
| 44 | |
| 45 // Minimum delta time in seconds before an on-demand check is allowed | 42 // Minimum delta time in seconds before an on-demand check is allowed |
| 46 // for the same component. | 43 // for the same component. |
| 47 virtual int OnDemandDelay() const = 0; | 44 virtual int OnDemandDelay() const = 0; |
| 48 | 45 |
| 49 // The time delay in seconds between applying updates for different | 46 // The time delay in seconds between applying updates for different |
| 50 // components. | 47 // components. |
| 51 virtual int UpdateDelay() const = 0; | 48 virtual int UpdateDelay() const = 0; |
| 52 | 49 |
| 53 // The URLs for the update checks. The URLs are tried in order, the first one | 50 // The URLs for the update checks. The URLs are tried in order, the first one |
| 54 // that succeeds wins. | 51 // that succeeds wins. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 135 |
| 139 protected: | 136 protected: |
| 140 friend class base::RefCountedThreadSafe<Configurator>; | 137 friend class base::RefCountedThreadSafe<Configurator>; |
| 141 | 138 |
| 142 virtual ~Configurator() {} | 139 virtual ~Configurator() {} |
| 143 }; | 140 }; |
| 144 | 141 |
| 145 } // namespace update_client | 142 } // namespace update_client |
| 146 | 143 |
| 147 #endif // COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ | 144 #endif // COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ |
| OLD | NEW |