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

Side by Side Diff: chrome/browser/chromeos/login/signin/oauth2_login_manager.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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 "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" 5 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 GetTokenService()->LoadCredentials(std::string()); 207 GetTokenService()->LoadCredentials(std::string());
208 } 208 }
209 209
210 void OAuth2LoginManager::OnRefreshTokenResponse( 210 void OAuth2LoginManager::OnRefreshTokenResponse(
211 const std::string& access_token, 211 const std::string& access_token,
212 int expires_in_seconds) { 212 int expires_in_seconds) {
213 account_info_fetcher_->GetUserInfo(access_token, kMaxRetries, this); 213 account_info_fetcher_->GetUserInfo(access_token, kMaxRetries, this);
214 } 214 }
215 215
216 void OAuth2LoginManager::OnGetUserInfoResponse( 216 void OAuth2LoginManager::OnGetUserInfoResponse(
217 scoped_ptr<base::DictionaryValue> user_info) { 217 std::unique_ptr<base::DictionaryValue> user_info) {
218 account_info_fetcher_.reset(); 218 account_info_fetcher_.reset();
219 219
220 std::string gaia_id; 220 std::string gaia_id;
221 std::string email; 221 std::string email;
222 user_info->GetString("id", &gaia_id); 222 user_info->GetString("id", &gaia_id);
223 user_info->GetString("email", &email); 223 user_info->GetString("email", &email);
224 224
225 AccountTrackerService* account_tracker = 225 AccountTrackerService* account_tracker =
226 AccountTrackerServiceFactory::GetForProfile(user_profile_); 226 AccountTrackerServiceFactory::GetForProfile(user_profile_);
227 account_tracker->SeedAccountInfo(gaia_id, email); 227 account_tracker->SeedAccountInfo(gaia_id, email);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 FOR_EACH_OBSERVER(Observer, observer_list_, 419 FOR_EACH_OBSERVER(Observer, observer_list_,
420 OnSessionRestoreStateChanged(user_profile_, state_)); 420 OnSessionRestoreStateChanged(user_profile_, state_));
421 } 421 }
422 422
423 void OAuth2LoginManager::SetSessionRestoreStartForTesting( 423 void OAuth2LoginManager::SetSessionRestoreStartForTesting(
424 const base::Time& time) { 424 const base::Time& time) {
425 session_restore_start_ = time; 425 session_restore_start_ = time;
426 } 426 }
427 427
428 } // namespace chromeos 428 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698