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

Side by Side Diff: chrome/browser/sync/signin_manager.cc

Issue 7551026: Adding service_name to GaiaOAuthFetcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replaced two instances of kSyncService with kDeviceManagementService Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/signin_manager.h ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/sync/signin_manager.h" 5 #include "chrome/browser/sync/signin_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/net/gaia/token_service.h" 9 #include "chrome/browser/net/gaia/token_service.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 DCHECK(!profile_->GetTokenService()->AreCredentialsValid()); 77 DCHECK(!profile_->GetTokenService()->AreCredentialsValid());
78 #endif 78 #endif
79 } 79 }
80 80
81 // Users must always sign out before they sign in again. 81 // Users must always sign out before they sign in again.
82 void SigninManager::StartOAuthSignIn() { 82 void SigninManager::StartOAuthSignIn() {
83 PrepareForSignin(); 83 PrepareForSignin();
84 oauth_login_.reset(new GaiaOAuthFetcher(this, 84 oauth_login_.reset(new GaiaOAuthFetcher(this,
85 profile_->GetRequestContext(), 85 profile_->GetRequestContext(),
86 profile_, 86 profile_,
87 GaiaConstants::kSyncService,
87 kSyncOAuth2Scope)); 88 kSyncOAuth2Scope));
88 oauth_login_->StartGetOAuthToken(); 89 oauth_login_->StartGetOAuthToken();
89 } 90 }
90 91
91 // Users must always sign out before they sign in again. 92 // Users must always sign out before they sign in again.
92 void SigninManager::StartSignIn(const std::string& username, 93 void SigninManager::StartSignIn(const std::string& username,
93 const std::string& password, 94 const std::string& password,
94 const std::string& login_token, 95 const std::string& login_token,
95 const std::string& login_captcha) { 96 const std::string& login_captcha) {
96 PrepareForSignin(); 97 PrepareForSignin();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 void SigninManager::OnOAuthGetAccessTokenSuccess(const std::string& token, 231 void SigninManager::OnOAuthGetAccessTokenSuccess(const std::string& token,
231 const std::string& secret) { 232 const std::string& secret) {
232 VLOG(1) << "SigninManager::OnOAuthGetAccessTokenSuccess"; 233 VLOG(1) << "SigninManager::OnOAuthGetAccessTokenSuccess";
233 } 234 }
234 235
235 void SigninManager::OnOAuthGetAccessTokenFailure( 236 void SigninManager::OnOAuthGetAccessTokenFailure(
236 const GoogleServiceAuthError& error) { 237 const GoogleServiceAuthError& error) {
237 VLOG(1) << "SigninManager::OnOAuthGetAccessTokenFailure"; 238 VLOG(1) << "SigninManager::OnOAuthGetAccessTokenFailure";
238 } 239 }
239 240
240 void SigninManager::OnOAuthWrapBridgeSuccess(const std::string& token, 241 void SigninManager::OnOAuthWrapBridgeSuccess(const std::string& service_name,
242 const std::string& token,
241 const std::string& expires_in) { 243 const std::string& expires_in) {
242 VLOG(1) << "SigninManager::OnOAuthWrapBridgeSuccess"; 244 VLOG(1) << "SigninManager::OnOAuthWrapBridgeSuccess";
243 } 245 }
244 246
245 void SigninManager::OnOAuthWrapBridgeFailure( 247 void SigninManager::OnOAuthWrapBridgeFailure(
246 const GoogleServiceAuthError& error) { 248 const GoogleServiceAuthError& error) {
247 VLOG(1) << "SigninManager::OnOAuthWrapBridgeFailure"; 249 VLOG(1) << "SigninManager::OnOAuthWrapBridgeFailure";
248 } 250 }
249 251
250 void SigninManager::OnUserInfoSuccess(const std::string& email) { 252 void SigninManager::OnUserInfoSuccess(const std::string& email) {
(...skipping 21 matching lines...) Expand all
272 profile_->GetRequestContext())); 274 profile_->GetRequestContext()));
273 } 275 }
274 276
275 client_login_->StartTokenAuth(tok_details->token()); 277 client_login_->StartTokenAuth(tok_details->token());
276 278
277 // We only want to do this once per sign-in. 279 // We only want to do this once per sign-in.
278 CleanupNotificationRegistration(); 280 CleanupNotificationRegistration();
279 } 281 }
280 #endif 282 #endif
281 } 283 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/signin_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698