| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/component_updater/ios_component_updater_configurato
r.h" | 5 #include "ios/chrome/browser/component_updater/ios_component_updater_configurato
r.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 std::string GetOSLongName() const override; | 42 std::string GetOSLongName() const override; |
| 43 std::string ExtraRequestParams() const override; | 43 std::string ExtraRequestParams() const override; |
| 44 std::string GetDownloadPreference() const override; | 44 std::string GetDownloadPreference() const override; |
| 45 net::URLRequestContextGetter* RequestContext() const override; | 45 net::URLRequestContextGetter* RequestContext() const override; |
| 46 scoped_refptr<update_client::OutOfProcessPatcher> CreateOutOfProcessPatcher() | 46 scoped_refptr<update_client::OutOfProcessPatcher> CreateOutOfProcessPatcher() |
| 47 const override; | 47 const override; |
| 48 bool EnabledDeltas() const override; | 48 bool EnabledDeltas() const override; |
| 49 bool EnabledComponentUpdates() const override; | 49 bool EnabledComponentUpdates() const override; |
| 50 bool EnabledBackgroundDownloader() const override; | 50 bool EnabledBackgroundDownloader() const override; |
| 51 bool EnabledCupSigning() const override; | 51 bool EnabledCupSigning() const override; |
| 52 bool EnabledImprovedRecovery() const override; |
| 52 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() | 53 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() |
| 53 const override; | 54 const override; |
| 54 PrefService* GetPrefService() const override; | 55 PrefService* GetPrefService() const override; |
| 55 bool IsPerUserInstall() const override; | 56 bool IsPerUserInstall() const override; |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 friend class base::RefCountedThreadSafe<IOSConfigurator>; | 59 friend class base::RefCountedThreadSafe<IOSConfigurator>; |
| 59 | 60 |
| 60 ConfiguratorImpl configurator_impl_; | 61 ConfiguratorImpl configurator_impl_; |
| 61 | 62 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } | 152 } |
| 152 | 153 |
| 153 bool IOSConfigurator::EnabledBackgroundDownloader() const { | 154 bool IOSConfigurator::EnabledBackgroundDownloader() const { |
| 154 return configurator_impl_.EnabledBackgroundDownloader(); | 155 return configurator_impl_.EnabledBackgroundDownloader(); |
| 155 } | 156 } |
| 156 | 157 |
| 157 bool IOSConfigurator::EnabledCupSigning() const { | 158 bool IOSConfigurator::EnabledCupSigning() const { |
| 158 return configurator_impl_.EnabledCupSigning(); | 159 return configurator_impl_.EnabledCupSigning(); |
| 159 } | 160 } |
| 160 | 161 |
| 162 bool IOSConfigurator::EnabledImprovedRecovery() const { |
| 163 return configurator_impl_.EnabledImprovedRecovery(); |
| 164 } |
| 165 |
| 161 scoped_refptr<base::SequencedTaskRunner> | 166 scoped_refptr<base::SequencedTaskRunner> |
| 162 IOSConfigurator::GetSequencedTaskRunner() const { | 167 IOSConfigurator::GetSequencedTaskRunner() const { |
| 163 return web::WebThread::GetBlockingPool() | 168 return web::WebThread::GetBlockingPool() |
| 164 ->GetSequencedTaskRunnerWithShutdownBehavior( | 169 ->GetSequencedTaskRunnerWithShutdownBehavior( |
| 165 web::WebThread::GetBlockingPool()->GetSequenceToken(), | 170 web::WebThread::GetBlockingPool()->GetSequenceToken(), |
| 166 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); | 171 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); |
| 167 } | 172 } |
| 168 | 173 |
| 169 PrefService* IOSConfigurator::GetPrefService() const { | 174 PrefService* IOSConfigurator::GetPrefService() const { |
| 170 return GetApplicationContext()->GetLocalState(); | 175 return GetApplicationContext()->GetLocalState(); |
| 171 } | 176 } |
| 172 | 177 |
| 173 bool IOSConfigurator::IsPerUserInstall() const { | 178 bool IOSConfigurator::IsPerUserInstall() const { |
| 174 return true; | 179 return true; |
| 175 } | 180 } |
| 176 | 181 |
| 177 } // namespace | 182 } // namespace |
| 178 | 183 |
| 179 scoped_refptr<update_client::Configurator> MakeIOSComponentUpdaterConfigurator( | 184 scoped_refptr<update_client::Configurator> MakeIOSComponentUpdaterConfigurator( |
| 180 const base::CommandLine* cmdline, | 185 const base::CommandLine* cmdline, |
| 181 net::URLRequestContextGetter* context_getter) { | 186 net::URLRequestContextGetter* context_getter) { |
| 182 return new IOSConfigurator(cmdline, context_getter); | 187 return new IOSConfigurator(cmdline, context_getter); |
| 183 } | 188 } |
| 184 | 189 |
| 185 } // namespace component_updater | 190 } // namespace component_updater |
| OLD | NEW |