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. | |
130 scoped_refptr<base::SequencedTaskRunner> | 126 scoped_refptr<base::SequencedTaskRunner> |
131 ChromeConfigurator::GetSequencedTaskRunner() const { | 127 ChromeConfigurator::GetSequencedTaskRunner() const { |
132 return content::BrowserThread::GetBlockingPool() | 128 return content::BrowserThread::GetBlockingPool() |
133 ->GetSequencedTaskRunnerWithShutdownBehavior( | 129 ->GetSequencedTaskRunnerWithShutdownBehavior( |
134 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), | 130 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), |
135 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); | 131 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); |
136 } | 132 } |
137 | 133 |
138 } // namespace | 134 } // namespace |
139 | 135 |
140 scoped_refptr<update_client::Configurator> | 136 scoped_refptr<update_client::Configurator> |
141 MakeChromeComponentUpdaterConfigurator( | 137 MakeChromeComponentUpdaterConfigurator( |
142 const base::CommandLine* cmdline, | 138 const base::CommandLine* cmdline, |
143 net::URLRequestContextGetter* context_getter) { | 139 net::URLRequestContextGetter* context_getter) { |
144 return new ChromeConfigurator(cmdline, context_getter); | 140 return new ChromeConfigurator(cmdline, context_getter); |
145 } | 141 } |
146 | 142 |
147 } // namespace component_updater | 143 } // namespace component_updater |
OLD | NEW |