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 "components/update_client/update_client.h" | 5 #include "components/update_client/update_client.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <queue> | 8 #include <queue> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/bind_helpers.h" | 14 #include "base/bind_helpers.h" |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/location.h" | 16 #include "base/location.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
20 #include "base/sequenced_task_runner.h" | 20 #include "base/sequenced_task_runner.h" |
21 #include "base/single_thread_task_runner.h" | 21 #include "base/single_thread_task_runner.h" |
22 #include "base/thread_task_runner_handle.h" | 22 #include "base/thread_task_runner_handle.h" |
23 #include "base/threading/sequenced_worker_pool.h" | 23 #include "base/threading/sequenced_worker_pool.h" |
24 #include "base/threading/thread_checker.h" | 24 #include "base/threading/thread_checker.h" |
| 25 #include "components/prefs/pref_registry_simple.h" |
25 #include "components/update_client/configurator.h" | 26 #include "components/update_client/configurator.h" |
26 #include "components/update_client/crx_update_item.h" | 27 #include "components/update_client/crx_update_item.h" |
| 28 #include "components/update_client/persisted_data.h" |
27 #include "components/update_client/ping_manager.h" | 29 #include "components/update_client/ping_manager.h" |
28 #include "components/update_client/task_update.h" | 30 #include "components/update_client/task_update.h" |
29 #include "components/update_client/update_checker.h" | 31 #include "components/update_client/update_checker.h" |
30 #include "components/update_client/update_client_internal.h" | 32 #include "components/update_client/update_client_internal.h" |
31 #include "components/update_client/update_engine.h" | 33 #include "components/update_client/update_engine.h" |
32 #include "components/update_client/update_response.h" | 34 #include "components/update_client/update_response.h" |
33 #include "components/update_client/utils.h" | 35 #include "components/update_client/utils.h" |
34 #include "url/gurl.h" | 36 #include "url/gurl.h" |
35 | 37 |
36 namespace update_client { | 38 namespace update_client { |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 ping_manager_->SendPing(&item); | 248 ping_manager_->SendPing(&item); |
247 } | 249 } |
248 | 250 |
249 scoped_refptr<UpdateClient> UpdateClientFactory( | 251 scoped_refptr<UpdateClient> UpdateClientFactory( |
250 const scoped_refptr<Configurator>& config) { | 252 const scoped_refptr<Configurator>& config) { |
251 scoped_ptr<PingManager> ping_manager(new PingManager(config)); | 253 scoped_ptr<PingManager> ping_manager(new PingManager(config)); |
252 return new UpdateClientImpl(config, std::move(ping_manager), | 254 return new UpdateClientImpl(config, std::move(ping_manager), |
253 &UpdateChecker::Create, &CrxDownloader::Create); | 255 &UpdateChecker::Create, &CrxDownloader::Create); |
254 } | 256 } |
255 | 257 |
| 258 void RegisterPrefs(PrefRegistrySimple* registry) { |
| 259 PersistedData::RegisterPrefs(registry); |
| 260 } |
| 261 |
256 } // namespace update_client | 262 } // namespace update_client |
OLD | NEW |