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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 std::string ExtraRequestParams() const override; | 75 std::string ExtraRequestParams() const override; |
76 std::string GetDownloadPreference() const override; | 76 std::string GetDownloadPreference() const override; |
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; | |
86 bool IsPerUserInstall() const override; | 85 bool IsPerUserInstall() const override; |
| 86 std::unique_ptr<PersistedData> CreateMetadata() const override; |
87 | 87 |
88 void SetBrand(const std::string& brand); | 88 void SetBrand(const std::string& brand); |
89 void SetOnDemandTime(int seconds); | 89 void SetOnDemandTime(int seconds); |
90 void SetInitialDelay(int seconds); | 90 void SetInitialDelay(int seconds); |
91 void SetDownloadPreference(const std::string& download_preference); | 91 void SetDownloadPreference(const std::string& download_preference); |
92 void SetEnabledCupSigning(bool use_cup_signing); | 92 void SetEnabledCupSigning(bool use_cup_signing); |
93 void SetEnabledComponentUpdates(bool enabled_component_updates); | 93 void SetEnabledComponentUpdates(bool enabled_component_updates); |
94 void SetUpdateCheckUrl(const GURL& url); | 94 void SetUpdateCheckUrl(const GURL& url); |
95 void SetPingUrl(const GURL& url); | 95 void SetPingUrl(const GURL& url); |
| 96 void SetPrefService(PrefService* pref); |
96 | 97 |
97 private: | 98 private: |
98 friend class base::RefCountedThreadSafe<TestConfigurator>; | 99 friend class base::RefCountedThreadSafe<TestConfigurator>; |
99 | 100 |
100 ~TestConfigurator() override; | 101 ~TestConfigurator() override; |
101 | 102 |
102 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; | 103 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; |
103 | 104 |
104 std::string brand_; | 105 std::string brand_; |
105 int initial_time_; | 106 int initial_time_; |
106 int ondemand_time_; | 107 int ondemand_time_; |
107 std::string download_preference_; | 108 std::string download_preference_; |
108 bool enabled_cup_signing_; | 109 bool enabled_cup_signing_; |
109 bool enabled_component_updates_; | 110 bool enabled_component_updates_; |
110 GURL update_check_url_; | 111 GURL update_check_url_; |
111 GURL ping_url_; | 112 GURL ping_url_; |
| 113 PrefService* pref_service_; |
112 | 114 |
113 scoped_refptr<net::TestURLRequestContextGetter> context_; | 115 scoped_refptr<net::TestURLRequestContextGetter> context_; |
114 | 116 |
115 DISALLOW_COPY_AND_ASSIGN(TestConfigurator); | 117 DISALLOW_COPY_AND_ASSIGN(TestConfigurator); |
116 }; | 118 }; |
117 | 119 |
118 } // namespace update_client | 120 } // namespace update_client |
119 | 121 |
120 #endif // COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ | 122 #endif // COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ |
OLD | NEW |