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

Side by Side Diff: components/sync/engine/fake_sync_engine.cc

Issue 2559123002: [Sync] SyncEngine refactor part 2: SyncServiceBase. (Closed)
Patch Set: Address comments. Created 4 years 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
« no previous file with comments | « components/sync/engine/fake_sync_engine.h ('k') | components/sync/engine/sync_engine.h » ('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 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 "components/sync/engine/fake_sync_engine.h" 5 #include "components/sync/engine/fake_sync_engine.h"
6 6
7 #include "components/sync/engine/activation_context.h" 7 #include "components/sync/engine/activation_context.h"
8 #include "components/sync/engine/sync_engine_host.h" 8 #include "components/sync/engine/sync_engine_host.h"
9 9
10 namespace syncer { 10 namespace syncer {
11 11
12 const char kTestCacheGuid[] = "test-guid"; 12 const char kTestCacheGuid[] = "test-guid";
13 13
14 FakeSyncEngine::FakeSyncEngine() : fail_initial_download_(false) {} 14 FakeSyncEngine::FakeSyncEngine() : fail_initial_download_(false) {}
15 FakeSyncEngine::~FakeSyncEngine() {} 15 FakeSyncEngine::~FakeSyncEngine() {}
16 16
17 void FakeSyncEngine::Initialize( 17 void FakeSyncEngine::Initialize(InitParams params) {
18 SyncEngineHost* host, 18 params.host->OnEngineInitialized(ModelTypeSet(), WeakHandle<JsBackend>(),
19 scoped_refptr<base::SingleThreadTaskRunner> sync_task_runner, 19 WeakHandle<DataTypeDebugInfoListener>(),
20 const WeakHandle<JsEventHandler>& event_handler, 20 kTestCacheGuid, !fail_initial_download_);
21 const GURL& service_url,
22 const std::string& sync_user_agent,
23 const SyncCredentials& credentials,
24 bool delete_sync_data_folder,
25 bool enable_local_sync_backend,
26 const base::FilePath& local_sync_backend_folder,
27 std::unique_ptr<SyncManagerFactory> sync_manager_factory,
28 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler,
29 const base::Closure& report_unrecoverable_error_function,
30 const HttpPostProviderFactoryGetter& http_post_provider_factory_getter,
31 std::unique_ptr<SyncEncryptionHandler::NigoriState> saved_nigori_state) {
32 host->OnEngineInitialized(ModelTypeSet(), WeakHandle<JsBackend>(),
33 WeakHandle<DataTypeDebugInfoListener>(),
34 kTestCacheGuid, !fail_initial_download_);
35 } 21 }
36 22
37 void FakeSyncEngine::TriggerRefresh(const ModelTypeSet& types) {} 23 void FakeSyncEngine::TriggerRefresh(const ModelTypeSet& types) {}
38 24
39 void FakeSyncEngine::UpdateCredentials(const SyncCredentials& credentials) {} 25 void FakeSyncEngine::UpdateCredentials(const SyncCredentials& credentials) {}
40 26
41 void FakeSyncEngine::StartSyncingWithServer() {} 27 void FakeSyncEngine::StartSyncingWithServer() {}
42 28
43 void FakeSyncEngine::SetEncryptionPassphrase(const std::string& passphrase, 29 void FakeSyncEngine::SetEncryptionPassphrase(const std::string& passphrase,
44 bool is_explicit) {} 30 bool is_explicit) {}
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 113
128 void FakeSyncEngine::ClearServerData( 114 void FakeSyncEngine::ClearServerData(
129 const SyncManager::ClearServerDataCallback& callback) { 115 const SyncManager::ClearServerDataCallback& callback) {
130 callback.Run(); 116 callback.Run();
131 } 117 }
132 118
133 void FakeSyncEngine::OnCookieJarChanged(bool account_mismatch, bool empty_jar) { 119 void FakeSyncEngine::OnCookieJarChanged(bool account_mismatch, bool empty_jar) {
134 } 120 }
135 121
136 } // namespace syncer 122 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine/fake_sync_engine.h ('k') | components/sync/engine/sync_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698