Skip to content

Commit

Permalink
google_apis: 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.

No functional changes.

BUG=636301

Review-Url: https://codereview.chromium.org/2229413002
Cr-Commit-Position: refs/heads/master@{#411629}
  • Loading branch information
skyostil authored and Commit bot committed Aug 12, 2016
1 parent 8ef165b commit 4768423
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions google_apis/drive/request_sender.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ RequestSender::RequestSender(

RequestSender::~RequestSender() {
DCHECK(thread_checker_.CalledOnValidThread());
STLDeleteContainerPointers(in_flight_requests_.begin(),
in_flight_requests_.end());
base::STLDeleteContainerPointers(in_flight_requests_.begin(),
in_flight_requests_.end());
}

base::Closure RequestSender::StartRequestWithAuthRetry(
Expand Down
14 changes: 7 additions & 7 deletions google_apis/gaia/account_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ AccountTracker::~AccountTracker() {

void AccountTracker::Shutdown() {
shutdown_called_ = true;
STLDeleteValues(&user_info_requests_);
base::STLDeleteValues(&user_info_requests_);
identity_provider_->GetTokenService()->RemoveObserver(this);
identity_provider_->RemoveObserver(this);
}
Expand Down Expand Up @@ -205,7 +205,7 @@ void AccountTracker::StartTrackingAccount(const std::string& account_key) {
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422460 AccountTracker::StartTrackingAccount"));

if (!ContainsKey(accounts_, account_key)) {
if (!base::ContainsKey(accounts_, account_key)) {
DVLOG(1) << "StartTracking " << account_key;
AccountState account_state;
account_state.ids.account_key = account_key;
Expand All @@ -217,7 +217,7 @@ void AccountTracker::StartTrackingAccount(const std::string& account_key) {

void AccountTracker::StopTrackingAccount(const std::string account_key) {
DVLOG(1) << "StopTracking " << account_key;
if (ContainsKey(accounts_, account_key)) {
if (base::ContainsKey(accounts_, account_key)) {
AccountState& account = accounts_[account_key];
if (!account.ids.gaia.empty()) {
UpdateSignInState(account_key, false);
Expand All @@ -226,7 +226,7 @@ void AccountTracker::StopTrackingAccount(const std::string account_key) {
accounts_.erase(account_key);
}

if (ContainsKey(user_info_requests_, account_key))
if (base::ContainsKey(user_info_requests_, account_key))
DeleteFetcher(user_info_requests_[account_key]);
}

Expand All @@ -242,7 +242,7 @@ void AccountTracker::StartFetchingUserInfo(const std::string& account_key) {
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422460 AccountTracker::StartFetchingUserInfo"));

if (ContainsKey(user_info_requests_, account_key)) {
if (base::ContainsKey(user_info_requests_, account_key)) {
// TODO(robliao): Remove ScopedTracker below once https://crbug.com/422460
// is fixed.
tracked_objects::ScopedTracker tracking_profile1(
Expand Down Expand Up @@ -278,7 +278,7 @@ void AccountTracker::StartFetchingUserInfo(const std::string& account_key) {
void AccountTracker::OnUserInfoFetchSuccess(AccountIdFetcher* fetcher,
const std::string& gaia_id) {
const std::string& account_key = fetcher->account_key();
DCHECK(ContainsKey(accounts_, account_key));
DCHECK(base::ContainsKey(accounts_, account_key));
AccountState& account = accounts_[account_key];

account.ids.gaia = gaia_id;
Expand All @@ -300,7 +300,7 @@ void AccountTracker::OnUserInfoFetchFailure(AccountIdFetcher* fetcher) {
void AccountTracker::DeleteFetcher(AccountIdFetcher* fetcher) {
DVLOG(1) << "DeleteFetcher " << fetcher->account_key();
const std::string& account_key = fetcher->account_key();
DCHECK(ContainsKey(user_info_requests_, account_key));
DCHECK(base::ContainsKey(user_info_requests_, account_key));
DCHECK_EQ(fetcher, user_info_requests_[account_key]);
user_info_requests_.erase(account_key);
delete fetcher;
Expand Down
4 changes: 2 additions & 2 deletions google_apis/gaia/oauth2_token_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ OAuth2TokenService::OAuth2TokenService(OAuth2TokenServiceDelegate* delegate)

OAuth2TokenService::~OAuth2TokenService() {
// Release all the pending fetchers.
STLDeleteContainerPairSecondPointers(
pending_fetchers_.begin(), pending_fetchers_.end());
base::STLDeleteContainerPairSecondPointers(pending_fetchers_.begin(),
pending_fetchers_.end());
}

OAuth2TokenServiceDelegate* OAuth2TokenService::GetDelegate() {
Expand Down

0 comments on commit 4768423

Please sign in to comment.