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

Side by Side Diff: chrome/browser/chromeos/gdata/auth_service.cc

Issue 10928017: Moving google_apis and GaiaClient to src/google_apis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 8 years, 3 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) 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/chromeos/gdata/auth_service.h" 5 #include "chrome/browser/chromeos/gdata/auth_service.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/message_loop_proxy.h" 11 #include "base/message_loop_proxy.h"
12 #include "chrome/browser/chromeos/gdata/operations_base.h" 12 #include "chrome/browser/chromeos/gdata/operations_base.h"
13 #include "chrome/browser/chromeos/gdata/task_util.h" 13 #include "chrome/browser/chromeos/gdata/task_util.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/signin/token_service.h" 15 #include "chrome/browser/signin/token_service.h"
16 #include "chrome/browser/signin/token_service_factory.h" 16 #include "chrome/browser/signin/token_service_factory.h"
17 #include "chrome/common/chrome_notification_types.h" 17 #include "chrome/common/chrome_notification_types.h"
18 #include "chrome/common/net/gaia/gaia_constants.h"
19 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
20 #include "content/public/browser/notification_details.h" 19 #include "content/public/browser/notification_details.h"
21 #include "content/public/browser/notification_source.h" 20 #include "content/public/browser/notification_source.h"
22 #include "content/public/browser/notification_types.h" 21 #include "content/public/browser/notification_types.h"
22 #include "google_apis/gaia/gaia_constants.h"
23 23
24 using content::BrowserThread; 24 using content::BrowserThread;
25 25
26 namespace gdata { 26 namespace gdata {
27 27
28 void AuthService::Initialize(Profile* profile) { 28 void AuthService::Initialize(Profile* profile) {
29 profile_ = profile; 29 profile_ = profile;
30 // Get OAuth2 refresh token (if we have any) and register for its updates. 30 // Get OAuth2 refresh token (if we have any) and register for its updates.
31 TokenService* service = TokenServiceFactory::GetForProfile(profile_); 31 TokenService* service = TokenServiceFactory::GetForProfile(profile_);
32 refresh_token_ = service->GetOAuth2LoginRefreshToken(); 32 refresh_token_ = service->GetOAuth2LoginRefreshToken();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 if (type == chrome::NOTIFICATION_TOKEN_AVAILABLE) { 120 if (type == chrome::NOTIFICATION_TOKEN_AVAILABLE) {
121 TokenService* service = TokenServiceFactory::GetForProfile(profile_); 121 TokenService* service = TokenServiceFactory::GetForProfile(profile_);
122 refresh_token_ = service->GetOAuth2LoginRefreshToken(); 122 refresh_token_ = service->GetOAuth2LoginRefreshToken();
123 } else { 123 } else {
124 refresh_token_.clear(); 124 refresh_token_.clear();
125 } 125 }
126 FOR_EACH_OBSERVER(Observer, observers_, OnOAuth2RefreshTokenChanged()); 126 FOR_EACH_OBSERVER(Observer, observers_, OnOAuth2RefreshTokenChanged());
127 } 127 }
128 128
129 } // namespace gdata 129 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/auth_service.h ('k') | chrome/browser/chromeos/gdata/operations_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698