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

Side by Side Diff: base/debug/activity_analyzer.cc

Issue 2234773002: base: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary formatting change Created 4 years, 4 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/ios/crb_protocol_observers.mm » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/debug/activity_analyzer.h" 5 #include "base/debug/activity_analyzer.h"
6 6
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/memory_mapped_file.h" 9 #include "base/files/memory_mapped_file.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Create the analyzer on the data. This will capture a snapshot of the 112 // Create the analyzer on the data. This will capture a snapshot of the
113 // tracker state. This can fail if the tracker is somehow corrupted or is 113 // tracker state. This can fail if the tracker is somehow corrupted or is
114 // in the process of shutting down. 114 // in the process of shutting down.
115 std::unique_ptr<ThreadActivityAnalyzer> analyzer(new ThreadActivityAnalyzer( 115 std::unique_ptr<ThreadActivityAnalyzer> analyzer(new ThreadActivityAnalyzer(
116 base, allocator_->GetAllocSize(tracker_ref))); 116 base, allocator_->GetAllocSize(tracker_ref)));
117 if (!analyzer->IsValid()) 117 if (!analyzer->IsValid())
118 continue; 118 continue;
119 119
120 // Add this analyzer to the map of known ones, indexed by a unique thread 120 // Add this analyzer to the map of known ones, indexed by a unique thread
121 // identifier. 121 // identifier.
122 DCHECK(!ContainsKey(analyzers_, analyzer->GetThreadKey())); 122 DCHECK(!base::ContainsKey(analyzers_, analyzer->GetThreadKey()));
123 analyzer->allocator_reference_ = ref; 123 analyzer->allocator_reference_ = ref;
124 analyzers_[analyzer->GetThreadKey()] = std::move(analyzer); 124 analyzers_[analyzer->GetThreadKey()] = std::move(analyzer);
125 } 125 }
126 } 126 }
127 127
128 } // namespace debug 128 } // namespace debug
129 } // namespace base 129 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/ios/crb_protocol_observers.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698