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

Side by Side Diff: chrome/browser/invalidation/fake_invalidation_service.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/fake_invalidation_service.h" 5 #include "chrome/browser/invalidation/fake_invalidation_service.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/invalidation/invalidation_service_util.h" 8 #include "chrome/browser/invalidation/invalidation_service_util.h"
9 #include "sync/notifier/object_id_invalidation_map.h" 9 #include "sync/notifier/object_id_invalidation_map.h"
10 10
11 namespace invalidation { 11 namespace invalidation {
12 12
13 FakeInvalidationAuthProvider::FakeInvalidationAuthProvider() { 13 FakeInvalidationAuthProvider::FakeInvalidationAuthProvider() {
14 token_service_.set_auto_post_fetch_response_on_message_loop(true); 14 token_service_.set_auto_post_fetch_response_on_message_loop(true);
15 } 15 }
16 16
17 FakeInvalidationAuthProvider::~FakeInvalidationAuthProvider() {} 17 FakeInvalidationAuthProvider::~FakeInvalidationAuthProvider() {}
18 18
19 OAuth2TokenService* FakeInvalidationAuthProvider::GetTokenService() { 19 OAuth2TokenService* FakeInvalidationAuthProvider::GetTokenService() {
20 return &token_service_; 20 return &token_service_;
21 } 21 }
22 22
23 std::string FakeInvalidationAuthProvider::GetUsername() {
24 return "fake@example.com";
25 }
26
23 std::string FakeInvalidationAuthProvider::GetAccountId() { 27 std::string FakeInvalidationAuthProvider::GetAccountId() {
24 return "fake@example.com"; 28 return "fake@example.com";
25 } 29 }
26 30
27 bool FakeInvalidationAuthProvider::ShowLoginUI() { return false; } 31 bool FakeInvalidationAuthProvider::ShowLoginUI() { return false; }
28 32
29 FakeInvalidationService::FakeInvalidationService() 33 FakeInvalidationService::FakeInvalidationService()
30 : client_id_(GenerateInvalidatorClientId()) { 34 : client_id_(GenerateInvalidatorClientId()) {
31 invalidator_registrar_.UpdateInvalidatorState(syncer::INVALIDATIONS_ENABLED); 35 invalidator_registrar_.UpdateInvalidatorState(syncer::INVALIDATIONS_ENABLED);
32 } 36 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 syncer::ObjectIdInvalidationMap invalidation_map; 107 syncer::ObjectIdInvalidationMap invalidation_map;
104 invalidation_map.Insert(invalidation_copy); 108 invalidation_map.Insert(invalidation_copy);
105 invalidator_registrar_.DispatchInvalidationsToHandlers(invalidation_map); 109 invalidator_registrar_.DispatchInvalidationsToHandlers(invalidation_map);
106 } 110 }
107 111
108 syncer::MockAckHandler* FakeInvalidationService::GetMockAckHandler() { 112 syncer::MockAckHandler* FakeInvalidationService::GetMockAckHandler() {
109 return &mock_ack_handler_; 113 return &mock_ack_handler_;
110 } 114 }
111 115
112 } // namespace invalidation 116 } // namespace invalidation
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698