| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // Overrrides for Configurator. | 58 // Overrrides for Configurator. |
| 59 int InitialDelay() const override; | 59 int InitialDelay() const override; |
| 60 int NextCheckDelay() const override; | 60 int NextCheckDelay() const override; |
| 61 int StepDelay() const override; | 61 int StepDelay() const override; |
| 62 int OnDemandDelay() const override; | 62 int OnDemandDelay() const override; |
| 63 int UpdateDelay() const override; | 63 int UpdateDelay() const override; |
| 64 std::vector<GURL> UpdateUrl() const override; | 64 std::vector<GURL> UpdateUrl() const override; |
| 65 std::vector<GURL> PingUrl() const override; | 65 std::vector<GURL> PingUrl() const override; |
| 66 base::Version GetBrowserVersion() const override; | 66 base::Version GetBrowserVersion() const override; |
| 67 std::string GetChannel() const override; | 67 std::string GetChannel() const override; |
| 68 std::string GetBrand() const override; |
| 68 std::string GetLang() const override; | 69 std::string GetLang() const override; |
| 69 std::string GetOSLongName() const override; | 70 std::string GetOSLongName() const override; |
| 70 std::string ExtraRequestParams() const override; | 71 std::string ExtraRequestParams() const override; |
| 71 std::string GetDownloadPreference() const override; | 72 std::string GetDownloadPreference() const override; |
| 72 net::URLRequestContextGetter* RequestContext() const override; | 73 net::URLRequestContextGetter* RequestContext() const override; |
| 73 scoped_refptr<OutOfProcessPatcher> CreateOutOfProcessPatcher() const override; | 74 scoped_refptr<OutOfProcessPatcher> CreateOutOfProcessPatcher() const override; |
| 74 bool DeltasEnabled() const override; | 75 bool DeltasEnabled() const override; |
| 75 bool UseBackgroundDownloader() const override; | 76 bool UseBackgroundDownloader() const override; |
| 76 bool UseCupSigning() const override; | 77 bool UseCupSigning() const override; |
| 77 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() | 78 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() |
| 78 const override; | 79 const override; |
| 79 | 80 |
| 81 void SetBrand(const std::string& brand); |
| 80 void SetOnDemandTime(int seconds); | 82 void SetOnDemandTime(int seconds); |
| 81 void SetInitialDelay(int seconds); | 83 void SetInitialDelay(int seconds); |
| 82 void SetDownloadPreference(const std::string& download_preference); | 84 void SetDownloadPreference(const std::string& download_preference); |
| 83 void SetUseCupSigning(bool use_cup_signing); | 85 void SetUseCupSigning(bool use_cup_signing); |
| 84 | 86 |
| 85 private: | 87 private: |
| 86 friend class base::RefCountedThreadSafe<TestConfigurator>; | 88 friend class base::RefCountedThreadSafe<TestConfigurator>; |
| 87 | 89 |
| 88 ~TestConfigurator() override; | 90 ~TestConfigurator() override; |
| 89 | 91 |
| 90 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; | 92 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; |
| 91 | 93 |
| 94 std::string brand_; |
| 92 int initial_time_; | 95 int initial_time_; |
| 93 int ondemand_time_; | 96 int ondemand_time_; |
| 94 std::string download_preference_; | 97 std::string download_preference_; |
| 95 bool use_cup_signing_; | 98 bool use_cup_signing_; |
| 96 | 99 |
| 97 scoped_refptr<net::TestURLRequestContextGetter> context_; | 100 scoped_refptr<net::TestURLRequestContextGetter> context_; |
| 98 | 101 |
| 99 DISALLOW_COPY_AND_ASSIGN(TestConfigurator); | 102 DISALLOW_COPY_AND_ASSIGN(TestConfigurator); |
| 100 }; | 103 }; |
| 101 | 104 |
| 102 } // namespace update_client | 105 } // namespace update_client |
| 103 | 106 |
| 104 #endif // COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ | 107 #endif // COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ |
| OLD | NEW |