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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 | 13 |
14 class GURL; | 14 class GURL; |
15 class PrefService; | |
15 | 16 |
16 namespace base { | 17 namespace base { |
17 class SequencedTaskRunner; | 18 class SequencedTaskRunner; |
18 class Version; | 19 class Version; |
19 } | 20 } |
20 | 21 |
21 namespace net { | 22 namespace net { |
22 class URLRequestContextGetter; | 23 class URLRequestContextGetter; |
23 } | 24 } |
24 | 25 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 // non on-demand components. | 105 // non on-demand components. |
105 virtual bool UseBackgroundDownloader() const = 0; | 106 virtual bool UseBackgroundDownloader() const = 0; |
106 | 107 |
107 // True if signing of update checks is enabled. | 108 // True if signing of update checks is enabled. |
108 virtual bool UseCupSigning() const = 0; | 109 virtual bool UseCupSigning() const = 0; |
109 | 110 |
110 // Gets a task runner to a blocking pool of threads suitable for worker jobs. | 111 // Gets a task runner to a blocking pool of threads suitable for worker jobs. |
111 virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() | 112 virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() |
112 const = 0; | 113 const = 0; |
113 | 114 |
115 // Returns a PrefService that the update_client can use to store persistent | |
116 // update information. The PrefService must outlive the entire update_client, | |
117 // and be safe to access from the thread the update_client is constructed | |
118 // on. | |
119 // Returning NULL is safe and will disable any functionality that requires | |
Bernhard Bauer
2016/04/08 09:06:09
Nit: Now that the NULL #define is deprecated, I wo
waffles
2016/04/08 19:11:00
Done.
| |
120 // persistent storage. | |
121 virtual PrefService* GetPrefService() const = 0; | |
122 | |
114 protected: | 123 protected: |
115 friend class base::RefCountedThreadSafe<Configurator>; | 124 friend class base::RefCountedThreadSafe<Configurator>; |
116 | 125 |
117 virtual ~Configurator() {} | 126 virtual ~Configurator() {} |
118 }; | 127 }; |
119 | 128 |
120 } // namespace update_client | 129 } // namespace update_client |
121 | 130 |
122 #endif // COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ | 131 #endif // COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ |
OLD | NEW |