| 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 "components/update_client/test_configurator.h" | 5 #include "components/update_client/test_configurator.h" |
| 6 | 6 |
| 7 #include "base/version.h" | 7 #include "base/version.h" |
| 8 #include "components/update_client/component_patcher_operation.h" | 8 #include "components/update_client/component_patcher_operation.h" |
| 9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 75 } |
| 76 | 76 |
| 77 std::string TestConfigurator::GetOSLongName() const { | 77 std::string TestConfigurator::GetOSLongName() const { |
| 78 return "Fake Operating System"; | 78 return "Fake Operating System"; |
| 79 } | 79 } |
| 80 | 80 |
| 81 std::string TestConfigurator::ExtraRequestParams() const { | 81 std::string TestConfigurator::ExtraRequestParams() const { |
| 82 return "extra=\"foo\""; | 82 return "extra=\"foo\""; |
| 83 } | 83 } |
| 84 | 84 |
| 85 std::string TestConfigurator::GetDownloadPreference() const { |
| 86 return download_preference_; |
| 87 } |
| 88 |
| 85 net::URLRequestContextGetter* TestConfigurator::RequestContext() const { | 89 net::URLRequestContextGetter* TestConfigurator::RequestContext() const { |
| 86 return context_.get(); | 90 return context_.get(); |
| 87 } | 91 } |
| 88 | 92 |
| 89 scoped_refptr<OutOfProcessPatcher> TestConfigurator::CreateOutOfProcessPatcher() | 93 scoped_refptr<OutOfProcessPatcher> TestConfigurator::CreateOutOfProcessPatcher() |
| 90 const { | 94 const { |
| 91 return NULL; | 95 return NULL; |
| 92 } | 96 } |
| 93 | 97 |
| 94 bool TestConfigurator::DeltasEnabled() const { | 98 bool TestConfigurator::DeltasEnabled() const { |
| 95 return true; | 99 return true; |
| 96 } | 100 } |
| 97 | 101 |
| 98 bool TestConfigurator::UseBackgroundDownloader() const { | 102 bool TestConfigurator::UseBackgroundDownloader() const { |
| 99 return false; | 103 return false; |
| 100 } | 104 } |
| 101 | 105 |
| 102 void TestConfigurator::SetOnDemandTime(int seconds) { | 106 void TestConfigurator::SetOnDemandTime(int seconds) { |
| 103 ondemand_time_ = seconds; | 107 ondemand_time_ = seconds; |
| 104 } | 108 } |
| 105 | 109 |
| 106 void TestConfigurator::SetInitialDelay(int seconds) { | 110 void TestConfigurator::SetInitialDelay(int seconds) { |
| 107 initial_time_ = seconds; | 111 initial_time_ = seconds; |
| 108 } | 112 } |
| 109 | 113 |
| 114 void TestConfigurator::SetDownloadPreference( |
| 115 const std::string& download_preference) { |
| 116 download_preference_ = download_preference; |
| 117 } |
| 118 |
| 110 scoped_refptr<base::SequencedTaskRunner> | 119 scoped_refptr<base::SequencedTaskRunner> |
| 111 TestConfigurator::GetSequencedTaskRunner() const { | 120 TestConfigurator::GetSequencedTaskRunner() const { |
| 112 DCHECK(worker_task_runner_.get()); | 121 DCHECK(worker_task_runner_.get()); |
| 113 return worker_task_runner_; | 122 return worker_task_runner_; |
| 114 } | 123 } |
| 115 | 124 |
| 116 } // namespace update_client | 125 } // namespace update_client |
| OLD | NEW |