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 "chrome/browser/signin/ubertoken_fetcher.h" | 5 #include "chrome/browser/signin/ubertoken_fetcher.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "chrome/browser/chrome_notification_types.h" |
11 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/signin/token_service.h" | 13 #include "chrome/browser/signin/token_service.h" |
13 #include "chrome/browser/signin/token_service_factory.h" | 14 #include "chrome/browser/signin/token_service_factory.h" |
14 #include "chrome/common/chrome_notification_types.h" | |
15 #include "google_apis/gaia/gaia_constants.h" | 15 #include "google_apis/gaia/gaia_constants.h" |
16 #include "google_apis/gaia/gaia_urls.h" | 16 #include "google_apis/gaia/gaia_urls.h" |
17 #include "google_apis/gaia/google_service_auth_error.h" | 17 #include "google_apis/gaia/google_service_auth_error.h" |
18 #include "net/base/load_flags.h" | 18 #include "net/base/load_flags.h" |
19 | 19 |
20 UbertokenFetcher::UbertokenFetcher(Profile* profile, | 20 UbertokenFetcher::UbertokenFetcher(Profile* profile, |
21 UbertokenConsumer* consumer) | 21 UbertokenConsumer* consumer) |
22 : profile_(profile), consumer_(consumer) { | 22 : profile_(profile), consumer_(consumer) { |
23 DCHECK(profile); | 23 DCHECK(profile); |
24 DCHECK(consumer); | 24 DCHECK(consumer); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 } | 111 } |
112 | 112 |
113 void UbertokenFetcher::OnUberAuthTokenSuccess(const std::string& token) { | 113 void UbertokenFetcher::OnUberAuthTokenSuccess(const std::string& token) { |
114 consumer_->OnUbertokenSuccess(token); | 114 consumer_->OnUbertokenSuccess(token); |
115 } | 115 } |
116 | 116 |
117 void UbertokenFetcher::OnUberAuthTokenFailure( | 117 void UbertokenFetcher::OnUberAuthTokenFailure( |
118 const GoogleServiceAuthError& error) { | 118 const GoogleServiceAuthError& error) { |
119 consumer_->OnUbertokenFailure(error); | 119 consumer_->OnUbertokenFailure(error); |
120 } | 120 } |
OLD | NEW |