Skip to content

Commit

Permalink
base: Use stl utilities from the base namespace
Browse files Browse the repository at this point in the history
The utilities in base/stl_util.h have been moved from the global
into the base namespace. This patch updates the call sites accordingly.

BUG=636301

Review-Url: https://codereview.chromium.org/2234773002
Cr-Commit-Position: refs/heads/master@{#411739}
  • Loading branch information
skyostil authored and Commit bot committed Aug 12, 2016
1 parent 84f93c4 commit 52f72dd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion base/debug/activity_analyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void GlobalActivityAnalyzer::PrepareAllAnalyzers() {

// Add this analyzer to the map of known ones, indexed by a unique thread
// identifier.
DCHECK(!ContainsKey(analyzers_, analyzer->GetThreadKey()));
DCHECK(!base::ContainsKey(analyzers_, analyzer->GetThreadKey()));
analyzer->allocator_reference_ = ref;
analyzers_[analyzer->GetThreadKey()] = std::move(analyzer);
}
Expand Down
2 changes: 1 addition & 1 deletion base/ios/crb_protocol_observers.mm
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ - (void)addObserver:(id)observer {
DCHECK(observer);
DCHECK([observer conformsToProtocol:self.protocol]);

if (ContainsValue(_observers, observer))
if (base::ContainsValue(_observers, observer))
return;

_observers.push_back(observer);
Expand Down
6 changes: 3 additions & 3 deletions base/memory/scoped_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class ScopedVector {
// Resize, deleting elements in the disappearing range if we are shrinking.
void resize(size_t new_size) {
if (v_.size() > new_size)
STLDeleteContainerPointers(v_.begin() + new_size, v_.end());
base::STLDeleteContainerPointers(v_.begin() + new_size, v_.end());
v_.resize(new_size);
}

Expand All @@ -98,7 +98,7 @@ class ScopedVector {
v_.assign(begin, end);
}

void clear() { STLDeleteElements(&v_); }
void clear() { base::STLDeleteElements(&v_); }

// Like |clear()|, but doesn't delete any elements.
void weak_clear() { v_.clear(); }
Expand All @@ -124,7 +124,7 @@ class ScopedVector {
}

iterator erase(iterator first, iterator last) {
STLDeleteContainerPointers(first, last);
base::STLDeleteContainerPointers(first, last);
return v_.erase(first, last);
}

Expand Down
2 changes: 1 addition & 1 deletion base/scoped_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ScopedObserver {
}

bool IsObserving(Source* source) const {
return ContainsValue(sources_, source);
return base::ContainsValue(sources_, source);
}

bool IsObservingSources() const { return !sources_.empty(); }
Expand Down

0 comments on commit 52f72dd

Please sign in to comment.