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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host_mock.cc

Issue 367153005: Sync: Refactoring of DEVICE_INFO syncable type - Part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed scoped_ptr issue in ProfileSyncService constructor Created 6 years, 5 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 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/sync/glue/sync_backend_host_mock.h" 5 #include "chrome/browser/sync/glue/sync_backend_host_mock.h"
6 6
7 #include "components/sync_driver/sync_frontend.h" 7 #include "components/sync_driver/sync_frontend.h"
8 8
9 namespace browser_sync { 9 namespace browser_sync {
10 10
11 const char kTestCacheGuid[] = "test-guid";
12
11 SyncBackendHostMock::SyncBackendHostMock() : fail_initial_download_(false) {} 13 SyncBackendHostMock::SyncBackendHostMock() : fail_initial_download_(false) {}
12 SyncBackendHostMock::~SyncBackendHostMock() {} 14 SyncBackendHostMock::~SyncBackendHostMock() {}
13 15
14 void SyncBackendHostMock::Initialize( 16 void SyncBackendHostMock::Initialize(
15 SyncFrontend* frontend, 17 SyncFrontend* frontend,
16 scoped_ptr<base::Thread> sync_thread, 18 scoped_ptr<base::Thread> sync_thread,
17 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, 19 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler,
18 const GURL& service_url, 20 const GURL& service_url,
19 const syncer::SyncCredentials& credentials, 21 const syncer::SyncCredentials& credentials,
20 bool delete_sync_data_folder, 22 bool delete_sync_data_folder,
21 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, 23 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory,
22 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler, 24 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler,
23 syncer::ReportUnrecoverableErrorFunction 25 syncer::ReportUnrecoverableErrorFunction
24 report_unrecoverable_error_function, 26 report_unrecoverable_error_function,
25 syncer::NetworkResources* network_resources) { 27 syncer::NetworkResources* network_resources) {
26 frontend->OnBackendInitialized( 28 frontend->OnBackendInitialized(
27 syncer::WeakHandle<syncer::JsBackend>(), 29 syncer::WeakHandle<syncer::JsBackend>(),
28 syncer::WeakHandle<syncer::DataTypeDebugInfoListener>(), 30 syncer::WeakHandle<syncer::DataTypeDebugInfoListener>(),
31 kTestCacheGuid,
29 !fail_initial_download_); 32 !fail_initial_download_);
30 } 33 }
31 34
32 void SyncBackendHostMock::UpdateCredentials( 35 void SyncBackendHostMock::UpdateCredentials(
33 const syncer::SyncCredentials& credentials) {} 36 const syncer::SyncCredentials& credentials) {}
34 37
35 void SyncBackendHostMock::StartSyncingWithServer() {} 38 void SyncBackendHostMock::StartSyncingWithServer() {}
36 39
37 void SyncBackendHostMock::SetEncryptionPassphrase( 40 void SyncBackendHostMock::SetEncryptionPassphrase(
38 const std::string& passphrase, 41 const std::string& passphrase,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 syncer::ModelTypeSet types, 130 syncer::ModelTypeSet types,
128 base::Callback<void(const std::vector<syncer::ModelType>& type, 131 base::Callback<void(const std::vector<syncer::ModelType>& type,
129 ScopedVector<base::ListValue>) > callback) {} 132 ScopedVector<base::ListValue>) > callback) {}
130 133
131 void SyncBackendHostMock::set_fail_initial_download(bool should_fail) { 134 void SyncBackendHostMock::set_fail_initial_download(bool should_fail) {
132 fail_initial_download_ = should_fail; 135 fail_initial_download_ = should_fail;
133 } 136 }
134 137
135 } // namespace browser_sync 138 } // namespace browser_sync
136 139
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc ('k') | chrome/browser/sync/profile_sync_components_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698