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 "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 Loading... |
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 |
OLD | NEW |