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

Side by Side Diff: chrome/browser/component_updater/chrome_component_updater_configurator.cc

Issue 1440393002: Reland of Change the update_client task runner behavior to continue on shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | components/component_updater/component_updater_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/component_updater/chrome_component_updater_configurator .h" 5 #include "chrome/browser/component_updater/chrome_component_updater_configurator .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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 bool ChromeConfigurator::DeltasEnabled() const { 118 bool ChromeConfigurator::DeltasEnabled() const {
119 return configurator_impl_.DeltasEnabled(); 119 return configurator_impl_.DeltasEnabled();
120 } 120 }
121 121
122 bool ChromeConfigurator::UseBackgroundDownloader() const { 122 bool ChromeConfigurator::UseBackgroundDownloader() const {
123 return configurator_impl_.UseBackgroundDownloader(); 123 return configurator_impl_.UseBackgroundDownloader();
124 } 124 }
125 125
126 // Returns a task runner to run blocking tasks. The task runner continues to run
127 // after the browser shuts down, until the OS terminates the process. This
128 // imposes certain requirements for the code using the task runner, such as
129 // not accessing any global browser state while the code is running.
126 scoped_refptr<base::SequencedTaskRunner> 130 scoped_refptr<base::SequencedTaskRunner>
127 ChromeConfigurator::GetSequencedTaskRunner() const { 131 ChromeConfigurator::GetSequencedTaskRunner() const {
128 return content::BrowserThread::GetBlockingPool() 132 return content::BrowserThread::GetBlockingPool()
129 ->GetSequencedTaskRunnerWithShutdownBehavior( 133 ->GetSequencedTaskRunnerWithShutdownBehavior(
130 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), 134 content::BrowserThread::GetBlockingPool()->GetSequenceToken(),
131 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); 135 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN);
132 } 136 }
133 137
134 } // namespace 138 } // namespace
135 139
136 scoped_refptr<update_client::Configurator> 140 scoped_refptr<update_client::Configurator>
137 MakeChromeComponentUpdaterConfigurator( 141 MakeChromeComponentUpdaterConfigurator(
138 const base::CommandLine* cmdline, 142 const base::CommandLine* cmdline,
139 net::URLRequestContextGetter* context_getter) { 143 net::URLRequestContextGetter* context_getter) {
140 return new ChromeConfigurator(cmdline, context_getter); 144 return new ChromeConfigurator(cmdline, context_getter);
141 } 145 }
142 146
143 } // namespace component_updater 147 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | components/component_updater/component_updater_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698