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> |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "components/update_client/persisted_data.h" | 29 #include "components/update_client/persisted_data.h" |
30 #include "components/update_client/ping_manager.h" | 30 #include "components/update_client/ping_manager.h" |
31 #include "components/update_client/task_send_uninstall_ping.h" | 31 #include "components/update_client/task_send_uninstall_ping.h" |
32 #include "components/update_client/task_update.h" | 32 #include "components/update_client/task_update.h" |
33 #include "components/update_client/update_checker.h" | 33 #include "components/update_client/update_checker.h" |
34 #include "components/update_client/update_client_errors.h" | 34 #include "components/update_client/update_client_errors.h" |
35 #include "components/update_client/update_client_internal.h" | 35 #include "components/update_client/update_client_internal.h" |
36 #include "components/update_client/update_engine.h" | 36 #include "components/update_client/update_engine.h" |
37 #include "components/update_client/update_response.h" | 37 #include "components/update_client/update_response.h" |
38 #include "components/update_client/utils.h" | 38 #include "components/update_client/utils.h" |
| 39 #include "third_party/libxml/src/include/libxml/parser.h" |
39 #include "url/gurl.h" | 40 #include "url/gurl.h" |
40 | 41 |
41 namespace update_client { | 42 namespace update_client { |
42 | 43 |
43 CrxUpdateItem::CrxUpdateItem() : state(ComponentState::kNew) {} | 44 CrxUpdateItem::CrxUpdateItem() : state(ComponentState::kNew) {} |
44 | 45 |
45 CrxUpdateItem::~CrxUpdateItem() { | 46 CrxUpdateItem::~CrxUpdateItem() { |
46 } | 47 } |
47 | 48 |
48 CrxUpdateItem::CrxUpdateItem(const CrxUpdateItem& other) = default; | 49 CrxUpdateItem::CrxUpdateItem(const CrxUpdateItem& other) = default; |
(...skipping 21 matching lines...) Expand all Loading... |
70 CrxDownloader::Factory crx_downloader_factory) | 71 CrxDownloader::Factory crx_downloader_factory) |
71 : is_stopped_(false), | 72 : is_stopped_(false), |
72 config_(config), | 73 config_(config), |
73 ping_manager_(std::move(ping_manager)), | 74 ping_manager_(std::move(ping_manager)), |
74 update_engine_(base::MakeUnique<UpdateEngine>( | 75 update_engine_(base::MakeUnique<UpdateEngine>( |
75 config, | 76 config, |
76 update_checker_factory, | 77 update_checker_factory, |
77 crx_downloader_factory, | 78 crx_downloader_factory, |
78 ping_manager_.get(), | 79 ping_manager_.get(), |
79 base::Bind(&UpdateClientImpl::NotifyObservers, | 80 base::Bind(&UpdateClientImpl::NotifyObservers, |
80 base::Unretained(this)))) {} | 81 base::Unretained(this)))) { |
| 82 // Temporary change while investigating crbug.com/717889. |
| 83 xmlInitParser(); |
| 84 } |
81 | 85 |
82 UpdateClientImpl::~UpdateClientImpl() { | 86 UpdateClientImpl::~UpdateClientImpl() { |
83 DCHECK(thread_checker_.CalledOnValidThread()); | 87 DCHECK(thread_checker_.CalledOnValidThread()); |
84 | 88 |
85 DCHECK(task_queue_.empty()); | 89 DCHECK(task_queue_.empty()); |
86 DCHECK(tasks_.empty()); | 90 DCHECK(tasks_.empty()); |
87 | 91 |
88 config_ = nullptr; | 92 config_ = nullptr; |
89 } | 93 } |
90 | 94 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 return base::MakeShared<UpdateClientImpl>( | 246 return base::MakeShared<UpdateClientImpl>( |
243 config, base::MakeUnique<PingManager>(config), &UpdateChecker::Create, | 247 config, base::MakeUnique<PingManager>(config), &UpdateChecker::Create, |
244 &CrxDownloader::Create); | 248 &CrxDownloader::Create); |
245 } | 249 } |
246 | 250 |
247 void RegisterPrefs(PrefRegistrySimple* registry) { | 251 void RegisterPrefs(PrefRegistrySimple* registry) { |
248 PersistedData::RegisterPrefs(registry); | 252 PersistedData::RegisterPrefs(registry); |
249 } | 253 } |
250 | 254 |
251 } // namespace update_client | 255 } // namespace update_client |
OLD | NEW |