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

Side by Side Diff: components/domain_reliability/context.cc

Issue 2110663002: components: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+one fix Created 4 years, 5 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/domain_reliability/config.cc ('k') | components/domain_reliability/dispatcher.cc » ('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 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/domain_reliability/context.h" 5 #include "components/domain_reliability/context.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 upload_time_ = base::TimeTicks(); 197 upload_time_ = base::TimeTicks();
198 } 198 }
199 199
200 std::unique_ptr<const Value> DomainReliabilityContext::CreateReport( 200 std::unique_ptr<const Value> DomainReliabilityContext::CreateReport(
201 base::TimeTicks upload_time, 201 base::TimeTicks upload_time,
202 const GURL& collector_url, 202 const GURL& collector_url,
203 int* max_upload_depth_out) const { 203 int* max_upload_depth_out) const {
204 int max_upload_depth = 0; 204 int max_upload_depth = 0;
205 205
206 std::unique_ptr<ListValue> beacons_value(new ListValue()); 206 std::unique_ptr<ListValue> beacons_value(new ListValue());
207 for (const auto& beacon : beacons_) { 207 for (const auto* beacon : beacons_) {
208 beacons_value->Append(beacon->ToValue(upload_time, 208 beacons_value->Append(beacon->ToValue(upload_time,
209 *last_network_change_time_, 209 *last_network_change_time_,
210 collector_url, 210 collector_url,
211 config().path_prefixes)); 211 config().path_prefixes));
212 if (beacon->upload_depth > max_upload_depth) 212 if (beacon->upload_depth > max_upload_depth)
213 max_upload_depth = beacon->upload_depth; 213 max_upload_depth = beacon->upload_depth;
214 } 214 }
215 215
216 std::unique_ptr<DictionaryValue> report_value(new DictionaryValue()); 216 std::unique_ptr<DictionaryValue> report_value(new DictionaryValue());
217 report_value->SetString("reporter", upload_reporter_string_); 217 report_value->SetString("reporter", upload_reporter_string_);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 delete beacons_.front(); 250 delete beacons_.front();
251 beacons_.pop_front(); 251 beacons_.pop_front();
252 252
253 // If that just removed a beacon counted in uploading_beacons_size_, decrement 253 // If that just removed a beacon counted in uploading_beacons_size_, decrement
254 // that. 254 // that.
255 if (uploading_beacons_size_ > 0) 255 if (uploading_beacons_size_ > 0)
256 --uploading_beacons_size_; 256 --uploading_beacons_size_;
257 } 257 }
258 258
259 } // namespace domain_reliability 259 } // namespace domain_reliability
OLDNEW
« no previous file with comments | « components/domain_reliability/config.cc ('k') | components/domain_reliability/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698