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_TEST_CONFIGURATOR_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ |
6 #define COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 net::URLRequestContextGetter* RequestContext() const override; | 77 net::URLRequestContextGetter* RequestContext() const override; |
78 scoped_refptr<OutOfProcessPatcher> CreateOutOfProcessPatcher() const override; | 78 scoped_refptr<OutOfProcessPatcher> CreateOutOfProcessPatcher() const override; |
79 bool EnabledDeltas() const override; | 79 bool EnabledDeltas() const override; |
80 bool EnabledComponentUpdates() const override; | 80 bool EnabledComponentUpdates() const override; |
81 bool EnabledBackgroundDownloader() const override; | 81 bool EnabledBackgroundDownloader() const override; |
82 bool EnabledCupSigning() const override; | 82 bool EnabledCupSigning() const override; |
83 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() | 83 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() |
84 const override; | 84 const override; |
85 PrefService* GetPrefService() const override; | 85 PrefService* GetPrefService() const override; |
86 bool IsPerUserInstall() const override; | 86 bool IsPerUserInstall() const override; |
| 87 std::unique_ptr<PersistedData> CreateMetadata() const override; |
87 | 88 |
88 void SetBrand(const std::string& brand); | 89 void SetBrand(const std::string& brand); |
89 void SetOnDemandTime(int seconds); | 90 void SetOnDemandTime(int seconds); |
90 void SetInitialDelay(int seconds); | 91 void SetInitialDelay(int seconds); |
91 void SetDownloadPreference(const std::string& download_preference); | 92 void SetDownloadPreference(const std::string& download_preference); |
92 void SetEnabledCupSigning(bool use_cup_signing); | 93 void SetEnabledCupSigning(bool use_cup_signing); |
93 void SetEnabledComponentUpdates(bool enabled_component_updates); | 94 void SetEnabledComponentUpdates(bool enabled_component_updates); |
94 void SetUpdateCheckUrl(const GURL& url); | 95 void SetUpdateCheckUrl(const GURL& url); |
95 void SetPingUrl(const GURL& url); | 96 void SetPingUrl(const GURL& url); |
| 97 void SetPrefService(PrefService* pref); |
96 | 98 |
97 private: | 99 private: |
98 friend class base::RefCountedThreadSafe<TestConfigurator>; | 100 friend class base::RefCountedThreadSafe<TestConfigurator>; |
99 | 101 |
100 ~TestConfigurator() override; | 102 ~TestConfigurator() override; |
101 | 103 |
102 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; | 104 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; |
103 | 105 |
104 std::string brand_; | 106 std::string brand_; |
105 int initial_time_; | 107 int initial_time_; |
106 int ondemand_time_; | 108 int ondemand_time_; |
107 std::string download_preference_; | 109 std::string download_preference_; |
108 bool enabled_cup_signing_; | 110 bool enabled_cup_signing_; |
109 bool enabled_component_updates_; | 111 bool enabled_component_updates_; |
110 GURL update_check_url_; | 112 GURL update_check_url_; |
111 GURL ping_url_; | 113 GURL ping_url_; |
| 114 PrefService* pref_; |
112 | 115 |
113 scoped_refptr<net::TestURLRequestContextGetter> context_; | 116 scoped_refptr<net::TestURLRequestContextGetter> context_; |
114 | 117 |
115 DISALLOW_COPY_AND_ASSIGN(TestConfigurator); | 118 DISALLOW_COPY_AND_ASSIGN(TestConfigurator); |
116 }; | 119 }; |
117 | 120 |
118 } // namespace update_client | 121 } // namespace update_client |
119 | 122 |
120 #endif // COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ | 123 #endif // COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ |
OLD | NEW |