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_COMPONENT_UPDATER_TEST_TEST_CONFIGURATOR_H_ | 5 #ifndef COMPONENTS_COMPONENT_UPDATER_TEST_TEST_CONFIGURATOR_H_ |
6 #define COMPONENTS_COMPONENT_UPDATER_TEST_TEST_CONFIGURATOR_H_ | 6 #define COMPONENTS_COMPONENT_UPDATER_TEST_TEST_CONFIGURATOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 21 matching lines...) Expand all Loading... |
32 struct CrxComponent; | 32 struct CrxComponent; |
33 | 33 |
34 class TestConfigurator : public Configurator { | 34 class TestConfigurator : public Configurator { |
35 public: | 35 public: |
36 TestConfigurator( | 36 TestConfigurator( |
37 const scoped_refptr<base::SequencedTaskRunner>& worker_task_runner, | 37 const scoped_refptr<base::SequencedTaskRunner>& worker_task_runner, |
38 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner); | 38 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner); |
39 virtual ~TestConfigurator(); | 39 virtual ~TestConfigurator(); |
40 | 40 |
41 // Overrrides for Configurator. | 41 // Overrrides for Configurator. |
42 virtual int InitialDelay() const OVERRIDE; | 42 virtual int InitialDelay() const override; |
43 virtual int NextCheckDelay() OVERRIDE; | 43 virtual int NextCheckDelay() override; |
44 virtual int StepDelay() const OVERRIDE; | 44 virtual int StepDelay() const override; |
45 virtual int StepDelayMedium() OVERRIDE; | 45 virtual int StepDelayMedium() override; |
46 virtual int MinimumReCheckWait() const OVERRIDE; | 46 virtual int MinimumReCheckWait() const override; |
47 virtual int OnDemandDelay() const OVERRIDE; | 47 virtual int OnDemandDelay() const override; |
48 virtual std::vector<GURL> UpdateUrl() const OVERRIDE; | 48 virtual std::vector<GURL> UpdateUrl() const override; |
49 virtual std::vector<GURL> PingUrl() const OVERRIDE; | 49 virtual std::vector<GURL> PingUrl() const override; |
50 virtual base::Version GetBrowserVersion() const OVERRIDE; | 50 virtual base::Version GetBrowserVersion() const override; |
51 virtual std::string GetChannel() const OVERRIDE; | 51 virtual std::string GetChannel() const override; |
52 virtual std::string GetLang() const OVERRIDE; | 52 virtual std::string GetLang() const override; |
53 virtual std::string GetOSLongName() const OVERRIDE; | 53 virtual std::string GetOSLongName() const override; |
54 virtual std::string ExtraRequestParams() const OVERRIDE; | 54 virtual std::string ExtraRequestParams() const override; |
55 virtual size_t UrlSizeLimit() const OVERRIDE; | 55 virtual size_t UrlSizeLimit() const override; |
56 virtual net::URLRequestContextGetter* RequestContext() const OVERRIDE; | 56 virtual net::URLRequestContextGetter* RequestContext() const override; |
57 virtual scoped_refptr<OutOfProcessPatcher> CreateOutOfProcessPatcher() | 57 virtual scoped_refptr<OutOfProcessPatcher> CreateOutOfProcessPatcher() |
58 const OVERRIDE; | 58 const override; |
59 virtual bool DeltasEnabled() const OVERRIDE; | 59 virtual bool DeltasEnabled() const override; |
60 virtual bool UseBackgroundDownloader() const OVERRIDE; | 60 virtual bool UseBackgroundDownloader() const override; |
61 virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() | 61 virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() |
62 const OVERRIDE; | 62 const override; |
63 virtual scoped_refptr<base::SingleThreadTaskRunner> | 63 virtual scoped_refptr<base::SingleThreadTaskRunner> |
64 GetSingleThreadTaskRunner() const OVERRIDE; | 64 GetSingleThreadTaskRunner() const override; |
65 | 65 |
66 void SetLoopCount(int times); | 66 void SetLoopCount(int times); |
67 void SetRecheckTime(int seconds); | 67 void SetRecheckTime(int seconds); |
68 void SetOnDemandTime(int seconds); | 68 void SetOnDemandTime(int seconds); |
69 void SetQuitClosure(const base::Closure& quit_closure); | 69 void SetQuitClosure(const base::Closure& quit_closure); |
70 void SetInitialDelay(int seconds); | 70 void SetInitialDelay(int seconds); |
71 | 71 |
72 private: | 72 private: |
73 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; | 73 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; |
74 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; | 74 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; |
75 | 75 |
76 int initial_time_; | 76 int initial_time_; |
77 int times_; | 77 int times_; |
78 int recheck_time_; | 78 int recheck_time_; |
79 int ondemand_time_; | 79 int ondemand_time_; |
80 | 80 |
81 scoped_refptr<net::TestURLRequestContextGetter> context_; | 81 scoped_refptr<net::TestURLRequestContextGetter> context_; |
82 base::Closure quit_closure_; | 82 base::Closure quit_closure_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(TestConfigurator); | 84 DISALLOW_COPY_AND_ASSIGN(TestConfigurator); |
85 }; | 85 }; |
86 | 86 |
87 } // namespace component_updater | 87 } // namespace component_updater |
88 | 88 |
89 #endif // COMPONENTS_COMPONENT_UPDATER_TEST_TEST_CONFIGURATOR_H_ | 89 #endif // COMPONENTS_COMPONENT_UPDATER_TEST_TEST_CONFIGURATOR_H_ |
OLD | NEW |