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

Side by Side Diff: chrome/browser/invalidation/device_invalidation_auth_provider_chromeos.cc

Issue 225403021: Extract Profile-independent GCMService from GCMProfileService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pass scoped_refptr as const reference. Created 6 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/invalidation/device_invalidation_auth_provider_chromeos .h" 5 #include "chrome/browser/invalidation/device_invalidation_auth_provider_chromeos .h"
6 6
7 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" 7 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
8 8
9 namespace invalidation { 9 namespace invalidation {
10 10
11 DeviceInvalidationAuthProvider::DeviceInvalidationAuthProvider( 11 DeviceInvalidationAuthProvider::DeviceInvalidationAuthProvider(
12 chromeos::DeviceOAuth2TokenService* token_service) 12 chromeos::DeviceOAuth2TokenService* token_service)
13 : token_service_(token_service) {} 13 : token_service_(token_service) {}
14 14
15 DeviceInvalidationAuthProvider::~DeviceInvalidationAuthProvider() {} 15 DeviceInvalidationAuthProvider::~DeviceInvalidationAuthProvider() {}
16 16
17 std::string DeviceInvalidationAuthProvider::GetUsername() {
18 return token_service_->GetRobotAccountId();
19 }
20
17 std::string DeviceInvalidationAuthProvider::GetAccountId() { 21 std::string DeviceInvalidationAuthProvider::GetAccountId() {
18 return token_service_->GetRobotAccountId(); 22 return token_service_->GetRobotAccountId();
19 } 23 }
20 24
21 OAuth2TokenService* DeviceInvalidationAuthProvider::GetTokenService() { 25 OAuth2TokenService* DeviceInvalidationAuthProvider::GetTokenService() {
22 return token_service_; 26 return token_service_;
23 } 27 }
24 28
25 bool DeviceInvalidationAuthProvider::ShowLoginUI() { return false; } 29 bool DeviceInvalidationAuthProvider::ShowLoginUI() { return false; }
26 30
27 } // namespace invalidation 31 } // namespace invalidation
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698