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 29 matching lines...) Expand all Loading... |
40 on_demand(false), | 40 on_demand(false), |
41 diff_update_failed(false), | 41 diff_update_failed(false), |
42 error_category(0), | 42 error_category(0), |
43 error_code(0), | 43 error_code(0), |
44 extra_code1(0), | 44 extra_code1(0), |
45 diff_error_category(0), | 45 diff_error_category(0), |
46 diff_error_code(0), | 46 diff_error_code(0), |
47 diff_extra_code1(0) { | 47 diff_extra_code1(0) { |
48 } | 48 } |
49 | 49 |
| 50 CrxUpdateItem::CrxUpdateItem(const CrxUpdateItem& other) = default; |
| 51 |
50 CrxUpdateItem::~CrxUpdateItem() { | 52 CrxUpdateItem::~CrxUpdateItem() { |
51 } | 53 } |
52 | 54 |
53 CrxComponent::CrxComponent() : allow_background_download(true) { | 55 CrxComponent::CrxComponent() : allow_background_download(true) { |
54 } | 56 } |
55 | 57 |
| 58 CrxComponent::CrxComponent(const CrxComponent& other) = default; |
| 59 |
56 CrxComponent::~CrxComponent() { | 60 CrxComponent::~CrxComponent() { |
57 } | 61 } |
58 | 62 |
59 // It is important that an instance of the UpdateClient binds an unretained | 63 // It is important that an instance of the UpdateClient binds an unretained |
60 // pointer to itself. Otherwise, a life time circular dependency between this | 64 // pointer to itself. Otherwise, a life time circular dependency between this |
61 // instance and its inner members prevents the destruction of this instance. | 65 // instance and its inner members prevents the destruction of this instance. |
62 // Using unretained references is allowed in this case since the life time of | 66 // Using unretained references is allowed in this case since the life time of |
63 // the UpdateClient instance exceeds the life time of its inner members, | 67 // the UpdateClient instance exceeds the life time of its inner members, |
64 // including any thread objects that might execute callbacks bound to it. | 68 // including any thread objects that might execute callbacks bound to it. |
65 UpdateClientImpl::UpdateClientImpl( | 69 UpdateClientImpl::UpdateClientImpl( |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 } | 247 } |
244 | 248 |
245 scoped_refptr<UpdateClient> UpdateClientFactory( | 249 scoped_refptr<UpdateClient> UpdateClientFactory( |
246 const scoped_refptr<Configurator>& config) { | 250 const scoped_refptr<Configurator>& config) { |
247 scoped_ptr<PingManager> ping_manager(new PingManager(config)); | 251 scoped_ptr<PingManager> ping_manager(new PingManager(config)); |
248 return new UpdateClientImpl(config, std::move(ping_manager), | 252 return new UpdateClientImpl(config, std::move(ping_manager), |
249 &UpdateChecker::Create, &CrxDownloader::Create); | 253 &UpdateChecker::Create, &CrxDownloader::Create); |
250 } | 254 } |
251 | 255 |
252 } // namespace update_client | 256 } // namespace update_client |
OLD | NEW |