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

Side by Side Diff: sync/internal_api/test/fake_sync_manager.cc

Issue 10540149: [Sync] Persist keystore key across restarts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix rebase Created 8 years, 4 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
« no previous file with comments | « sync/internal_api/syncapi_unittest.cc ('k') | sync/tools/sync_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "sync/internal_api/public/test/fake_sync_manager.h" 5 #include "sync/internal_api/public/test/fake_sync_manager.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "sync/internal_api/public/http_post_provider_factory.h" 8 #include "sync/internal_api/public/http_post_provider_factory.h"
9 #include "sync/internal_api/public/internal_components_factory.h" 9 #include "sync/internal_api/public/internal_components_factory.h"
10 #include "sync/internal_api/public/util/weak_handle.h" 10 #include "sync/internal_api/public/util/weak_handle.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 int sync_server_port, 55 int sync_server_port,
56 bool use_ssl, 56 bool use_ssl,
57 const scoped_refptr<base::TaskRunner>& blocking_task_runner, 57 const scoped_refptr<base::TaskRunner>& blocking_task_runner,
58 scoped_ptr<HttpPostProviderFactory> post_factory, 58 scoped_ptr<HttpPostProviderFactory> post_factory,
59 const std::vector<ModelSafeWorker*>& workers, 59 const std::vector<ModelSafeWorker*>& workers,
60 ExtensionsActivityMonitor* extensions_activity_monitor, 60 ExtensionsActivityMonitor* extensions_activity_monitor,
61 ChangeDelegate* change_delegate, 61 ChangeDelegate* change_delegate,
62 const SyncCredentials& credentials, 62 const SyncCredentials& credentials,
63 scoped_ptr<SyncNotifier> sync_notifier, 63 scoped_ptr<SyncNotifier> sync_notifier,
64 const std::string& restored_key_for_bootstrapping, 64 const std::string& restored_key_for_bootstrapping,
65 const std::string& restored_keystore_key_for_bootstrapping,
65 bool keystore_encryption_enabled, 66 bool keystore_encryption_enabled,
66 scoped_ptr<InternalComponentsFactory> internal_components_factory, 67 scoped_ptr<InternalComponentsFactory> internal_components_factory,
67 Encryptor* encryptor, 68 Encryptor* encryptor,
68 UnrecoverableErrorHandler* unrecoverable_error_handler, 69 UnrecoverableErrorHandler* unrecoverable_error_handler,
69 ReportUnrecoverableErrorFunction 70 ReportUnrecoverableErrorFunction
70 report_unrecoverable_error_function) { 71 report_unrecoverable_error_function) {
71 sync_loop_ = MessageLoop::current(); 72 sync_loop_ = MessageLoop::current();
72 PurgePartiallySyncedTypes(); 73 PurgePartiallySyncedTypes();
73 FOR_EACH_OBSERVER(SyncManager::Observer, observers_, 74 FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
74 OnInitializationComplete( 75 OnInitializationComplete(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 SyncStatus FakeSyncManager::GetDetailedStatus() const { 171 SyncStatus FakeSyncManager::GetDetailedStatus() const {
171 NOTIMPLEMENTED(); 172 NOTIMPLEMENTED();
172 return SyncStatus(); 173 return SyncStatus();
173 } 174 }
174 175
175 bool FakeSyncManager::IsUsingExplicitPassphrase() { 176 bool FakeSyncManager::IsUsingExplicitPassphrase() {
176 NOTIMPLEMENTED(); 177 NOTIMPLEMENTED();
177 return false; 178 return false;
178 } 179 }
179 180
181 bool FakeSyncManager::GetKeystoreKeyBootstrapToken(std::string* token) {
182 return false;
183 }
184
180 void FakeSyncManager::SaveChanges() { 185 void FakeSyncManager::SaveChanges() {
181 // Do nothing. 186 // Do nothing.
182 } 187 }
183 188
184 void FakeSyncManager::StopSyncingForShutdown(const base::Closure& callback) { 189 void FakeSyncManager::StopSyncingForShutdown(const base::Closure& callback) {
185 sync_loop_->PostTask(FROM_HERE, callback); 190 sync_loop_->PostTask(FROM_HERE, callback);
186 } 191 }
187 192
188 void FakeSyncManager::ShutdownOnSyncThread() { 193 void FakeSyncManager::ShutdownOnSyncThread() {
189 // Do nothing. 194 // Do nothing.
(...skipping 17 matching lines...) Expand all
207 return false; 212 return false;
208 } 213 }
209 214
210 bool FakeSyncManager::HasUnsyncedItems() { 215 bool FakeSyncManager::HasUnsyncedItems() {
211 NOTIMPLEMENTED(); 216 NOTIMPLEMENTED();
212 return false; 217 return false;
213 } 218 }
214 219
215 } // namespace syncer 220 } // namespace syncer
216 221
OLDNEW
« no previous file with comments | « sync/internal_api/syncapi_unittest.cc ('k') | sync/tools/sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698