| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; | 50 CrxUpdateItem::CrxUpdateItem(const CrxUpdateItem& other) = default; |
| 51 | 51 |
| 52 CrxUpdateItem::~CrxUpdateItem() { | 52 CrxUpdateItem::~CrxUpdateItem() { |
| 53 } | 53 } |
| 54 | 54 |
| 55 CrxComponent::CrxComponent() : allow_background_download(true) { | 55 CrxComponent::CrxComponent() |
| 56 } | 56 : allows_background_download(true), requires_network_encryption(true) {} |
| 57 | 57 |
| 58 CrxComponent::CrxComponent(const CrxComponent& other) = default; | 58 CrxComponent::CrxComponent(const CrxComponent& other) = default; |
| 59 | 59 |
| 60 CrxComponent::~CrxComponent() { | 60 CrxComponent::~CrxComponent() { |
| 61 } | 61 } |
| 62 | 62 |
| 63 // 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 |
| 64 // pointer to itself. Otherwise, a life time circular dependency between this | 64 // pointer to itself. Otherwise, a life time circular dependency between this |
| 65 // instance and its inner members prevents the destruction of this instance. | 65 // instance and its inner members prevents the destruction of this instance. |
| 66 // 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 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 } | 247 } |
| 248 | 248 |
| 249 scoped_refptr<UpdateClient> UpdateClientFactory( | 249 scoped_refptr<UpdateClient> UpdateClientFactory( |
| 250 const scoped_refptr<Configurator>& config) { | 250 const scoped_refptr<Configurator>& config) { |
| 251 scoped_ptr<PingManager> ping_manager(new PingManager(config)); | 251 scoped_ptr<PingManager> ping_manager(new PingManager(config)); |
| 252 return new UpdateClientImpl(config, std::move(ping_manager), | 252 return new UpdateClientImpl(config, std::move(ping_manager), |
| 253 &UpdateChecker::Create, &CrxDownloader::Create); | 253 &UpdateChecker::Create, &CrxDownloader::Create); |
| 254 } | 254 } |
| 255 | 255 |
| 256 } // namespace update_client | 256 } // namespace update_client |
| OLD | NEW |