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 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/version.h" |
8 #include "chrome/browser/component_updater/test/test_configurator.h" | 9 #include "chrome/browser/component_updater/test/test_configurator.h" |
9 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
10 #include "url/gurl.h" | 11 #include "url/gurl.h" |
11 | 12 |
12 using content::BrowserThread; | 13 using content::BrowserThread; |
13 | 14 |
14 namespace component_updater { | 15 namespace component_updater { |
15 | 16 |
16 TestConfigurator::TestConfigurator() | 17 TestConfigurator::TestConfigurator() |
17 : initial_time_(0), | 18 : initial_time_(0), |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 60 |
60 GURL TestConfigurator::UpdateUrl() const { | 61 GURL TestConfigurator::UpdateUrl() const { |
61 return GURL(POST_INTERCEPT_SCHEME | 62 return GURL(POST_INTERCEPT_SCHEME |
62 "://" POST_INTERCEPT_HOSTNAME POST_INTERCEPT_PATH); | 63 "://" POST_INTERCEPT_HOSTNAME POST_INTERCEPT_PATH); |
63 } | 64 } |
64 | 65 |
65 GURL TestConfigurator::PingUrl() const { | 66 GURL TestConfigurator::PingUrl() const { |
66 return UpdateUrl(); | 67 return UpdateUrl(); |
67 } | 68 } |
68 | 69 |
| 70 base::Version TestConfigurator::GetBrowserVersion() const { |
| 71 // Needs to be larger than the required version in tested component manifests. |
| 72 return base::Version("30.0"); |
| 73 } |
| 74 |
| 75 std::string TestConfigurator::GetChannel() const { |
| 76 return "fake_channel_string"; |
| 77 } |
| 78 |
| 79 std::string TestConfigurator::GetLang() const { |
| 80 return "fake_lang"; |
| 81 } |
| 82 |
| 83 std::string TestConfigurator::GetOSLongName() const { |
| 84 return "Fake Operating System"; |
| 85 } |
| 86 |
69 std::string TestConfigurator::ExtraRequestParams() const { | 87 std::string TestConfigurator::ExtraRequestParams() const { |
70 return "extra=\"foo\""; | 88 return "extra=\"foo\""; |
71 } | 89 } |
72 | 90 |
73 size_t TestConfigurator::UrlSizeLimit() const { | 91 size_t TestConfigurator::UrlSizeLimit() const { |
74 return 256; | 92 return 256; |
75 } | 93 } |
76 | 94 |
77 net::URLRequestContextGetter* TestConfigurator::RequestContext() const { | 95 net::URLRequestContextGetter* TestConfigurator::RequestContext() const { |
78 return context_.get(); | 96 return context_.get(); |
(...skipping 27 matching lines...) Expand all Loading... |
106 | 124 |
107 void TestConfigurator::SetQuitClosure(const base::Closure& quit_closure) { | 125 void TestConfigurator::SetQuitClosure(const base::Closure& quit_closure) { |
108 quit_closure_ = quit_closure; | 126 quit_closure_ = quit_closure; |
109 } | 127 } |
110 | 128 |
111 void TestConfigurator::SetInitialDelay(int seconds) { | 129 void TestConfigurator::SetInitialDelay(int seconds) { |
112 initial_time_ = seconds; | 130 initial_time_ = seconds; |
113 } | 131 } |
114 | 132 |
115 } // namespace component_updater | 133 } // namespace component_updater |
OLD | NEW |