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

Side by Side Diff: components/sync_driver/fake_sync_service.cc

Issue 1314903004: Sync: Refactoring DataTypeController to make the design shareable with USS datatypes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR comments Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/sync_driver/fake_sync_service.h" 5 #include "components/sync_driver/fake_sync_service.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "sync/internal_api/public/base_transaction.h" 8 #include "sync/internal_api/public/base_transaction.h"
9 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" 9 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
10 #include "sync/internal_api/public/user_share.h" 10 #include "sync/internal_api/public/user_share.h"
11 11
12 namespace sync_driver { 12 namespace sync_driver {
13 13
14 FakeSyncService::FakeSyncService() : error_(GoogleServiceAuthError::NONE) { 14 FakeSyncService::FakeSyncService()
15 } 15 : error_(GoogleServiceAuthError::NONE),
16 user_share_(make_scoped_ptr(new syncer::UserShare())) {}
16 17
17 FakeSyncService::~FakeSyncService() { 18 FakeSyncService::~FakeSyncService() {
18 } 19 }
19 20
20 bool FakeSyncService::HasSyncSetupCompleted() const { 21 bool FakeSyncService::HasSyncSetupCompleted() const {
21 return false; 22 return false;
22 } 23 }
23 24
24 bool FakeSyncService::IsSyncAllowed() const { 25 bool FakeSyncService::IsSyncAllowed() const {
25 return false; 26 return false;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 bool FakeSyncService::SetDecryptionPassphrase(const std::string& passphrase) { 126 bool FakeSyncService::SetDecryptionPassphrase(const std::string& passphrase) {
126 return false; 127 return false;
127 } 128 }
128 129
129 bool FakeSyncService::IsCryptographerReady( 130 bool FakeSyncService::IsCryptographerReady(
130 const syncer::BaseTransaction* trans) const { 131 const syncer::BaseTransaction* trans) const {
131 return false; 132 return false;
132 } 133 }
133 134
134 syncer::UserShare* FakeSyncService::GetUserShare() const { 135 syncer::UserShare* FakeSyncService::GetUserShare() const {
135 return new syncer::UserShare(); 136 return user_share_.get();
136 } 137 }
137 138
138 LocalDeviceInfoProvider* FakeSyncService::GetLocalDeviceInfoProvider() const { 139 LocalDeviceInfoProvider* FakeSyncService::GetLocalDeviceInfoProvider() const {
139 return nullptr; 140 return nullptr;
140 } 141 }
141 142
142 void FakeSyncService::RegisterDataTypeController( 143 void FakeSyncService::RegisterDataTypeController(
143 sync_driver::DataTypeController* data_type_controller) { 144 sync_driver::DataTypeController* data_type_controller) {
144 } 145 }
145 146
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 std::string FakeSyncService::unrecoverable_error_message() const { 192 std::string FakeSyncService::unrecoverable_error_message() const {
192 return unrecoverable_error_message_; 193 return unrecoverable_error_message_;
193 } 194 }
194 195
195 tracked_objects::Location FakeSyncService::unrecoverable_error_location() 196 tracked_objects::Location FakeSyncService::unrecoverable_error_location()
196 const { 197 const {
197 return tracked_objects::Location(); 198 return tracked_objects::Location();
198 } 199 }
199 200
200 } // namespace sync_driver 201 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync_driver/fake_sync_service.h ('k') | components/sync_driver/frontend_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698