| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 // The source of contexts for all the url requests. | 93 // The source of contexts for all the url requests. |
| 94 virtual net::URLRequestContextGetter* RequestContext() const = 0; | 94 virtual net::URLRequestContextGetter* RequestContext() const = 0; |
| 95 | 95 |
| 96 // Returns a new out of process patcher. May be NULL for implementations | 96 // Returns a new out of process patcher. May be NULL for implementations |
| 97 // that patch in-process. | 97 // that patch in-process. |
| 98 virtual scoped_refptr<update_client::OutOfProcessPatcher> | 98 virtual scoped_refptr<update_client::OutOfProcessPatcher> |
| 99 CreateOutOfProcessPatcher() const = 0; | 99 CreateOutOfProcessPatcher() const = 0; |
| 100 | 100 |
| 101 // True means that this client can handle delta updates. | 101 // True means that this client can handle delta updates. |
| 102 virtual bool DeltasEnabled() const = 0; | 102 virtual bool EnabledDeltas() const = 0; |
| 103 |
| 104 // True if component updates are enabled. Updates for all components are |
| 105 // enabled by default. This method allows enabling or disabling |
| 106 // updates for certain components such as the plugins. Updates for some |
| 107 // components are always enabled and can't be disabled programatically. |
| 108 virtual bool EnabledComponentUpdates() const = 0; |
| 103 | 109 |
| 104 // True means that the background downloader can be used for downloading | 110 // True means that the background downloader can be used for downloading |
| 105 // non on-demand components. | 111 // non on-demand components. |
| 106 virtual bool UseBackgroundDownloader() const = 0; | 112 virtual bool EnabledBackgroundDownloader() const = 0; |
| 107 | 113 |
| 108 // True if signing of update checks is enabled. | 114 // True if signing of update checks is enabled. |
| 109 virtual bool UseCupSigning() const = 0; | 115 virtual bool EnabledCupSigning() const = 0; |
| 110 | 116 |
| 111 // Gets a task runner to a blocking pool of threads suitable for worker jobs. | 117 // Gets a task runner to a blocking pool of threads suitable for worker jobs. |
| 112 virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() | 118 virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() |
| 113 const = 0; | 119 const = 0; |
| 114 | 120 |
| 115 // Returns a PrefService that the update_client can use to store persistent | 121 // Returns a PrefService that the update_client can use to store persistent |
| 116 // update information. The PrefService must outlive the entire update_client, | 122 // update information. The PrefService must outlive the entire update_client, |
| 117 // and be safe to access from the thread the update_client is constructed | 123 // and be safe to access from the thread the update_client is constructed |
| 118 // on. | 124 // on. |
| 119 // Returning null is safe and will disable any functionality that requires | 125 // Returning null is safe and will disable any functionality that requires |
| 120 // persistent storage. | 126 // persistent storage. |
| 121 virtual PrefService* GetPrefService() const = 0; | 127 virtual PrefService* GetPrefService() const = 0; |
| 122 | 128 |
| 123 protected: | 129 protected: |
| 124 friend class base::RefCountedThreadSafe<Configurator>; | 130 friend class base::RefCountedThreadSafe<Configurator>; |
| 125 | 131 |
| 126 virtual ~Configurator() {} | 132 virtual ~Configurator() {} |
| 127 }; | 133 }; |
| 128 | 134 |
| 129 } // namespace update_client | 135 } // namespace update_client |
| 130 | 136 |
| 131 #endif // COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ | 137 #endif // COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ |
| OLD | NEW |