Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Side by Side Diff: components/update_client/update_client.cc

Issue 1740333002: Allow fallback from https to http for component update checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/update_client/update_client.h ('k') | components/update_client/update_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698