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

Side by Side Diff: chrome/browser/net/gaia/token_service.cc

Issue 8360003: [cros] OOBE: add histograms for Profile image fetching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 2 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
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/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/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.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 "content/browser/browser_thread.h" 14 #include "content/browser/browser_thread.h"
15 #include "content/public/browser/notification_service.h" 15 #include "content/public/browser/notification_service.h"
16 #include "content/public/browser/notification_source.h" 16 #include "content/public/browser/notification_source.h"
17 #include "net/url_request/url_request_context_getter.h" 17 #include "net/url_request/url_request_context_getter.h"
18 18
19 // Unfortunately kNumServices must be defined in the .h. 19 // Unfortunately kNumServices must be defined in the .h.
20 // TODO(chron): Sync doesn't use the TalkToken anymore so we can stop 20 // TODO(chron): Sync doesn't use the TalkToken anymore so we can stop
21 // requesting it. 21 // requesting it.
22 const char* TokenService::kServices[] = { 22 const char* TokenService::kServices[] = {
23 GaiaConstants::kPicasaService,
23 GaiaConstants::kGaiaService, 24 GaiaConstants::kGaiaService,
24 GaiaConstants::kSyncService, 25 GaiaConstants::kSyncService,
25 GaiaConstants::kTalkService, 26 GaiaConstants::kTalkService,
26 GaiaConstants::kDeviceManagementService, 27 GaiaConstants::kDeviceManagementService,
27 GaiaConstants::kPicasaService,
28 }; 28 };
29 29
30 const char* kUnusedServiceScope = "unused-service-scope"; 30 const char* kUnusedServiceScope = "unused-service-scope";
31 31
32 // Unfortunately kNumOAuthServices must be defined in the .h. 32 // Unfortunately kNumOAuthServices must be defined in the .h.
33 // For OAuth, Chrome uses the OAuth2 service scope as the service name. 33 // For OAuth, Chrome uses the OAuth2 service scope as the service name.
34 const char* TokenService::kOAuthServices[] = { 34 const char* TokenService::kOAuthServices[] = {
35 GaiaConstants::kSyncServiceOAuth, 35 GaiaConstants::kSyncServiceOAuth,
36 }; 36 };
37 37
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 } 408 }
409 409
410 void TokenService::Observe(int type, 410 void TokenService::Observe(int type,
411 const content::NotificationSource& source, 411 const content::NotificationSource& source,
412 const content::NotificationDetails& details) { 412 const content::NotificationDetails& details) {
413 DCHECK_EQ(type, chrome::NOTIFICATION_TOKEN_UPDATED); 413 DCHECK_EQ(type, chrome::NOTIFICATION_TOKEN_UPDATED);
414 TokenAvailableDetails* tok_details = 414 TokenAvailableDetails* tok_details =
415 content::Details<TokenAvailableDetails>(details).ptr(); 415 content::Details<TokenAvailableDetails>(details).ptr();
416 OnIssueAuthTokenSuccess(tok_details->service(), tok_details->token()); 416 OnIssueAuthTokenSuccess(tok_details->service(), tok_details->token());
417 } 417 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_image_screen.cc ('k') | chrome/browser/resources/chromeos/login/oobe_screen_user_image.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698