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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } | 124 } |
125 | 125 |
126 // Returns a task runner to run blocking tasks. The task runner continues to run | 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 | 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 | 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. | 129 // not accessing any global browser state while the code is running. |
130 scoped_refptr<base::SequencedTaskRunner> | 130 scoped_refptr<base::SequencedTaskRunner> |
131 ChromeConfigurator::GetSequencedTaskRunner() const { | 131 ChromeConfigurator::GetSequencedTaskRunner() const { |
132 return content::BrowserThread::GetBlockingPool() | 132 return content::BrowserThread::GetBlockingPool() |
133 ->GetSequencedTaskRunnerWithShutdownBehavior( | 133 ->GetSequencedTaskRunnerWithShutdownBehavior( |
134 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), | 134 base::SequencedWorkerPool::GetSequenceToken(), |
135 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); | 135 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); |
136 } | 136 } |
137 | 137 |
138 } // namespace | 138 } // namespace |
139 | 139 |
140 scoped_refptr<update_client::Configurator> | 140 scoped_refptr<update_client::Configurator> |
141 MakeChromeComponentUpdaterConfigurator( | 141 MakeChromeComponentUpdaterConfigurator( |
142 const base::CommandLine* cmdline, | 142 const base::CommandLine* cmdline, |
143 net::URLRequestContextGetter* context_getter) { | 143 net::URLRequestContextGetter* context_getter) { |
144 return new ChromeConfigurator(cmdline, context_getter); | 144 return new ChromeConfigurator(cmdline, context_getter); |
145 } | 145 } |
146 | 146 |
147 } // namespace component_updater | 147 } // namespace component_updater |
OLD | NEW |