Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: ios/chrome/browser/component_updater/ios_component_updater_configurator.cc

Issue 2875423002: Use TaskScheduler instead of SequencedWorkerPool in ios_component_updater_configurator.cc. (Closed)
Patch Set: rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/sequenced_task_runner.h" 10 #include "base/task_scheduler/post_task.h"
11 #include "base/threading/sequenced_worker_pool.h"
12 #include "base/version.h" 11 #include "base/version.h"
13 #include "components/component_updater/configurator_impl.h" 12 #include "components/component_updater/configurator_impl.h"
14 #include "components/update_client/out_of_process_patcher.h" 13 #include "components/update_client/out_of_process_patcher.h"
15 #include "components/update_client/update_query_params.h" 14 #include "components/update_client/update_query_params.h"
16 #include "ios/chrome/browser/application_context.h" 15 #include "ios/chrome/browser/application_context.h"
17 #include "ios/chrome/browser/google/google_brand.h" 16 #include "ios/chrome/browser/google/google_brand.h"
18 #include "ios/chrome/common/channel_info.h" 17 #include "ios/chrome/common/channel_info.h"
19 #include "ios/web/public/web_thread.h"
20 18
21 namespace component_updater { 19 namespace component_updater {
22 20
23 namespace { 21 namespace {
24 22
25 class IOSConfigurator : public update_client::Configurator { 23 class IOSConfigurator : public update_client::Configurator {
26 public: 24 public:
27 IOSConfigurator(const base::CommandLine* cmdline, 25 IOSConfigurator(const base::CommandLine* cmdline,
28 net::URLRequestContextGetter* url_request_getter); 26 net::URLRequestContextGetter* url_request_getter);
29 27
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 bool IOSConfigurator::EnabledBackgroundDownloader() const { 147 bool IOSConfigurator::EnabledBackgroundDownloader() const {
150 return configurator_impl_.EnabledBackgroundDownloader(); 148 return configurator_impl_.EnabledBackgroundDownloader();
151 } 149 }
152 150
153 bool IOSConfigurator::EnabledCupSigning() const { 151 bool IOSConfigurator::EnabledCupSigning() const {
154 return configurator_impl_.EnabledCupSigning(); 152 return configurator_impl_.EnabledCupSigning();
155 } 153 }
156 154
157 scoped_refptr<base::SequencedTaskRunner> 155 scoped_refptr<base::SequencedTaskRunner>
158 IOSConfigurator::GetSequencedTaskRunner() const { 156 IOSConfigurator::GetSequencedTaskRunner() const {
159 return web::WebThread::GetBlockingPool() 157 return base::CreateSequencedTaskRunnerWithTraits(
160 ->GetSequencedTaskRunnerWithShutdownBehavior( 158 {base::MayBlock(), base::TaskPriority::BACKGROUND,
161 web::WebThread::GetBlockingPool()->GetSequenceToken(), 159 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN});
162 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
163 } 160 }
164 161
165 PrefService* IOSConfigurator::GetPrefService() const { 162 PrefService* IOSConfigurator::GetPrefService() const {
166 return GetApplicationContext()->GetLocalState(); 163 return GetApplicationContext()->GetLocalState();
167 } 164 }
168 165
169 bool IOSConfigurator::IsPerUserInstall() const { 166 bool IOSConfigurator::IsPerUserInstall() const {
170 return true; 167 return true;
171 } 168 }
172 169
173 } // namespace 170 } // namespace
174 171
175 scoped_refptr<update_client::Configurator> MakeIOSComponentUpdaterConfigurator( 172 scoped_refptr<update_client::Configurator> MakeIOSComponentUpdaterConfigurator(
176 const base::CommandLine* cmdline, 173 const base::CommandLine* cmdline,
177 net::URLRequestContextGetter* context_getter) { 174 net::URLRequestContextGetter* context_getter) {
178 return base::MakeRefCounted<IOSConfigurator>(cmdline, context_getter); 175 return base::MakeRefCounted<IOSConfigurator>(cmdline, context_getter);
179 } 176 }
180 177
181 } // namespace component_updater 178 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698