| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/stringprintf.h" | 6 #include "base/stringprintf.h" |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/signin/token_service.h" | 8 #include "chrome/browser/signin/token_service.h" |
| 9 #include "chrome/browser/signin/token_service_factory.h" | 9 #include "chrome/browser/signin/token_service_factory.h" |
| 10 #include "chrome/browser/signin/ubertoken_fetcher.h" | 10 #include "chrome/browser/signin/ubertoken_fetcher.h" |
| 11 #include "chrome/common/chrome_notification_types.h" | 11 #include "chrome/common/chrome_notification_types.h" |
| 12 #include "chrome/common/net/gaia/gaia_constants.h" | 12 #include "google_apis/gaia/gaia_constants.h" |
| 13 #include "chrome/common/net/gaia/gaia_urls.h" | 13 #include "google_apis/gaia/gaia_urls.h" |
| 14 #include "chrome/common/net/gaia/google_service_auth_error.h" | 14 #include "google_apis/gaia/google_service_auth_error.h" |
| 15 #include "net/base/load_flags.h" | 15 #include "net/base/load_flags.h" |
| 16 | 16 |
| 17 UbertokenFetcher::UbertokenFetcher(Profile* profile, | 17 UbertokenFetcher::UbertokenFetcher(Profile* profile, |
| 18 UbertokenConsumer* consumer) | 18 UbertokenConsumer* consumer) |
| 19 : profile_(profile), consumer_(consumer) { | 19 : profile_(profile), consumer_(consumer) { |
| 20 DCHECK(profile); | 20 DCHECK(profile); |
| 21 DCHECK(consumer); | 21 DCHECK(consumer); |
| 22 } | 22 } |
| 23 | 23 |
| 24 UbertokenFetcher::~UbertokenFetcher() { | 24 UbertokenFetcher::~UbertokenFetcher() { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 } | 106 } |
| 107 | 107 |
| 108 void UbertokenFetcher::OnUberAuthTokenSuccess(const std::string& token) { | 108 void UbertokenFetcher::OnUberAuthTokenSuccess(const std::string& token) { |
| 109 consumer_->OnUbertokenSuccess(token); | 109 consumer_->OnUbertokenSuccess(token); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void UbertokenFetcher::OnUberAuthTokenFailure( | 112 void UbertokenFetcher::OnUberAuthTokenFailure( |
| 113 const GoogleServiceAuthError& error) { | 113 const GoogleServiceAuthError& error) { |
| 114 consumer_->OnUbertokenFailure(error); | 114 consumer_->OnUbertokenFailure(error); |
| 115 } | 115 } |
| OLD | NEW |