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

Side by Side Diff: base/metrics/statistics_recorder.cc

Issue 2101263003: base: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | base/trace_event/heap_profiler_allocation_context_tracker.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/metrics/statistics_recorder.h" 5 #include "base/metrics/statistics_recorder.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // static 281 // static
282 void StatisticsRecorder::GetBucketRanges( 282 void StatisticsRecorder::GetBucketRanges(
283 std::vector<const BucketRanges*>* output) { 283 std::vector<const BucketRanges*>* output) {
284 if (lock_ == NULL) 284 if (lock_ == NULL)
285 return; 285 return;
286 base::AutoLock auto_lock(*lock_); 286 base::AutoLock auto_lock(*lock_);
287 if (ranges_ == NULL) 287 if (ranges_ == NULL)
288 return; 288 return;
289 289
290 for (const auto& entry : *ranges_) { 290 for (const auto& entry : *ranges_) {
291 for (const auto& range_entry : *entry.second) { 291 for (auto* range_entry : *entry.second) {
292 output->push_back(range_entry); 292 output->push_back(range_entry);
293 } 293 }
294 } 294 }
295 } 295 }
296 296
297 // static 297 // static
298 HistogramBase* StatisticsRecorder::FindHistogram(base::StringPiece name) { 298 HistogramBase* StatisticsRecorder::FindHistogram(base::StringPiece name) {
299 // This must be called *before* the lock is acquired below because it will 299 // This must be called *before* the lock is acquired below because it will
300 // call back into this object to register histograms. Those called methods 300 // call back into this object to register histograms. Those called methods
301 // will acquire the lock at that time. 301 // will acquire the lock at that time.
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 // static 520 // static
521 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL; 521 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL;
522 // static 522 // static
523 StatisticsRecorder::CallbackMap* StatisticsRecorder::callbacks_ = NULL; 523 StatisticsRecorder::CallbackMap* StatisticsRecorder::callbacks_ = NULL;
524 // static 524 // static
525 StatisticsRecorder::RangesMap* StatisticsRecorder::ranges_ = NULL; 525 StatisticsRecorder::RangesMap* StatisticsRecorder::ranges_ = NULL;
526 // static 526 // static
527 base::Lock* StatisticsRecorder::lock_ = NULL; 527 base::Lock* StatisticsRecorder::lock_ = NULL;
528 528
529 } // namespace base 529 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/trace_event/heap_profiler_allocation_context_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698