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

Unified Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 7574009: Added OAuth support to TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaked mock for OnOAuthWrapBridgeFailure. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/online_attempt.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index b07b0e6d965f4e61bbbcc3aacaef9925784c02e3..27341de122caf40385f24d0747013d3cd4d627ae 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -156,7 +156,6 @@ class OAuthLoginVerifier : public GaiaOAuthConsumer {
: oauth_fetcher_(this,
user_profile->GetOffTheRecordProfile()->GetRequestContext(),
user_profile->GetOffTheRecordProfile(),
- GaiaConstants::kSyncService,
kServiceScopeChromeOS),
oauth1_token_(oauth1_token),
oauth1_secret_(oauth1_secret) {
@@ -201,7 +200,6 @@ class PolicyOAuthFetcher : public GaiaOAuthConsumer {
: oauth_fetcher_(this,
profile->GetRequestContext(),
profile,
- GaiaConstants::kDeviceManagementService,
kServiceScopeChromeOSDeviceManagement),
oauth1_token_(oauth1_token),
oauth1_secret_(oauth1_secret) {
@@ -211,8 +209,8 @@ class PolicyOAuthFetcher : public GaiaOAuthConsumer {
virtual ~PolicyOAuthFetcher() {}
void Start() {
- oauth_fetcher_.StartOAuthWrapBridge(oauth1_token_, oauth1_secret_, "3600",
- std::string(GaiaConstants::kDeviceManagementService),
+ oauth_fetcher_.StartOAuthWrapBridge(
+ oauth1_token_, oauth1_secret_, GaiaConstants::kGaiaOAuthDuration,
std::string(kServiceScopeChromeOSDeviceManagement));
}
@@ -227,8 +225,9 @@ class PolicyOAuthFetcher : public GaiaOAuthConsumer {
}
virtual void OnOAuthWrapBridgeFailure(
+ const std::string& service_name,
const GoogleServiceAuthError& error) OVERRIDE {
- LOG(WARNING) << "Failed to get OAuth access token.";
+ LOG(WARNING) << "Failed to get OAuth access token for " << service_name;
}
private:
@@ -569,7 +568,6 @@ void LoginUtilsImpl::FetchOAuth1AccessToken(Profile* auth_profile) {
oauth_fetcher_.reset(new GaiaOAuthFetcher(this,
auth_profile->GetRequestContext(),
auth_profile,
- GaiaConstants::kSyncService,
kServiceScopeChromeOS));
// Let's first get the Oauth request token and OAuth1 token+secret.
// One we get that, we will kick off individial requests for OAuth2 tokens for
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/online_attempt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698