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

Side by Side Diff: components/update_client/action_update_check.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
« no previous file with comments | « components/update_client/action_update_check.h ('k') | components/update_client/ping_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/action_update_check.h" 5 #include "components/update_client/action_update_check.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 update_checker_->CheckForUpdates( 92 update_checker_->CheckForUpdates(
93 update_context_->update_items, extra_request_parameters_, 93 update_context_->update_items, extra_request_parameters_,
94 base::Bind(&ActionUpdateCheck::UpdateCheckComplete, 94 base::Bind(&ActionUpdateCheck::UpdateCheckComplete,
95 base::Unretained(this))); 95 base::Unretained(this)));
96 } 96 }
97 97
98 void ActionUpdateCheck::UpdateCheckComplete( 98 void ActionUpdateCheck::UpdateCheckComplete(
99 int error, 99 int error,
100 const UpdateResponse::Results& results) { 100 const UpdateResponse::Results& results,
101 int retry_after_sec) {
101 DCHECK(thread_checker_.CalledOnValidThread()); 102 DCHECK(thread_checker_.CalledOnValidThread());
102 103
104 update_context_->retry_after_sec_ = retry_after_sec;
105
103 if (!error) 106 if (!error)
104 OnUpdateCheckSucceeded(results); 107 OnUpdateCheckSucceeded(results);
105 else 108 else
106 OnUpdateCheckFailed(error); 109 OnUpdateCheckFailed(error);
107 } 110 }
108 111
109 void ActionUpdateCheck::OnUpdateCheckSucceeded( 112 void ActionUpdateCheck::OnUpdateCheckSucceeded(
110 const UpdateResponse::Results& results) { 113 const UpdateResponse::Results& results) {
111 DCHECK(thread_checker_.CalledOnValidThread()); 114 DCHECK(thread_checker_.CalledOnValidThread());
112 VLOG(1) << "Update check succeeded."; 115 VLOG(1) << "Update check succeeded.";
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 203
201 VLOG(1) << "Update check failed." << error; 204 VLOG(1) << "Update check failed." << error;
202 205
203 ChangeAllItemsState(CrxUpdateItem::State::kChecking, 206 ChangeAllItemsState(CrxUpdateItem::State::kChecking,
204 CrxUpdateItem::State::kNoUpdate); 207 CrxUpdateItem::State::kNoUpdate);
205 208
206 UpdateComplete(error); 209 UpdateComplete(error);
207 } 210 }
208 211
209 } // namespace update_client 212 } // namespace update_client
OLDNEW
« no previous file with comments | « components/update_client/action_update_check.h ('k') | components/update_client/ping_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698