Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: components/update_client/test_configurator.h

Issue 2873533002: Prepare to abstract PersistedData by making it part of the configurator.
Patch Set: Rename pref_ to pref_service_. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/update_client/configurator.h ('k') | components/update_client/test_configurator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « components/update_client/configurator.h ('k') | components/update_client/test_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698