OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/net/gaia/token_service.h" | 5 #include "chrome/browser/net/gaia/token_service.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/browser_thread.h" | 9 #include "chrome/browser/browser_thread.h" |
10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
12 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" | 12 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" |
13 #include "chrome/common/net/gaia/gaia_constants.h" | 13 #include "chrome/common/net/gaia/gaia_constants.h" |
14 #include "chrome/common/net/url_request_context_getter.h" | 14 #include "chrome/common/net/url_request_context_getter.h" |
15 #include "chrome/common/notification_service.h" | 15 #include "chrome/common/notification_service.h" |
16 | 16 |
17 // Unfortunately kNumServices must be defined in the .h. | 17 // Unfortunately kNumServices must be defined in the .h. |
18 // TODO(chron): Sync doesn't use the TalkToken anymore so we can stop | 18 // TODO(chron): Sync doesn't use the TalkToken anymore so we can stop |
19 // requesting it. | 19 // requesting it. |
20 const char* TokenService::kServices[] = { | 20 const char* TokenService::kServices[] = { |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 } | 252 } |
253 | 253 |
254 void TokenService::Observe(NotificationType type, | 254 void TokenService::Observe(NotificationType type, |
255 const NotificationSource& source, | 255 const NotificationSource& source, |
256 const NotificationDetails& details) { | 256 const NotificationDetails& details) { |
257 DCHECK(type == NotificationType::TOKEN_UPDATED); | 257 DCHECK(type == NotificationType::TOKEN_UPDATED); |
258 TokenAvailableDetails* tok_details = | 258 TokenAvailableDetails* tok_details = |
259 Details<TokenAvailableDetails>(details).ptr(); | 259 Details<TokenAvailableDetails>(details).ptr(); |
260 OnIssueAuthTokenSuccess(tok_details->service(), tok_details->token()); | 260 OnIssueAuthTokenSuccess(tok_details->service(), tok_details->token()); |
261 } | 261 } |
OLD | NEW |