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

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

Issue 10455012: [Sync] Add support for performing a GetKey on startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fred's comments 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
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/test_internal_components_factory.h" 5 #include "sync/internal_api/public/test/test_internal_components_factory.h"
6 6
7 #include "sync/sessions/sync_session_context.h" 7 #include "sync/sessions/sync_session_context.h"
8 #include "sync/syncable/in_memory_directory_backing_store.h" 8 #include "sync/syncable/in_memory_directory_backing_store.h"
9 #include "sync/syncable/on_disk_directory_backing_store.h" 9 #include "sync/syncable/on_disk_directory_backing_store.h"
10 #include "sync/test/engine/fake_sync_scheduler.h" 10 #include "sync/test/engine/fake_sync_scheduler.h"
(...skipping 14 matching lines...) Expand all
25 25
26 scoped_ptr<sessions::SyncSessionContext> 26 scoped_ptr<sessions::SyncSessionContext>
27 TestInternalComponentsFactory::BuildContext( 27 TestInternalComponentsFactory::BuildContext(
28 ServerConnectionManager* connection_manager, 28 ServerConnectionManager* connection_manager,
29 syncable::Directory* directory, 29 syncable::Directory* directory,
30 const std::vector<ModelSafeWorker*> workers, 30 const std::vector<ModelSafeWorker*> workers,
31 ExtensionsActivityMonitor* monitor, 31 ExtensionsActivityMonitor* monitor,
32 ThrottledDataTypeTracker* throttled_data_type_tracker, 32 ThrottledDataTypeTracker* throttled_data_type_tracker,
33 const std::vector<SyncEngineEventListener*>& listeners, 33 const std::vector<SyncEngineEventListener*>& listeners,
34 sessions::DebugInfoGetter* debug_info_getter, 34 sessions::DebugInfoGetter* debug_info_getter,
35 TrafficRecorder* traffic_recorder) { 35 TrafficRecorder* traffic_recorder,
36 bool keystore_encryption_enabled) {
36 37
37 // Tests don't wire up listeners. 38 // Tests don't wire up listeners.
38 std::vector<SyncEngineEventListener*> empty_listeners; 39 std::vector<SyncEngineEventListener*> empty_listeners;
39 return scoped_ptr<sessions::SyncSessionContext>( 40 return scoped_ptr<sessions::SyncSessionContext>(
40 new sessions::SyncSessionContext( 41 new sessions::SyncSessionContext(
41 connection_manager, directory, workers, monitor, 42 connection_manager, directory, workers, monitor,
42 throttled_data_type_tracker, empty_listeners, debug_info_getter, 43 throttled_data_type_tracker, empty_listeners, debug_info_getter,
43 traffic_recorder)); 44 traffic_recorder,
45 keystore_encryption_enabled));
46
44 } 47 }
45 48
46 scoped_ptr<syncable::DirectoryBackingStore> 49 scoped_ptr<syncable::DirectoryBackingStore>
47 TestInternalComponentsFactory::BuildDirectoryBackingStore( 50 TestInternalComponentsFactory::BuildDirectoryBackingStore(
48 const std::string& dir_name, const FilePath& backing_filepath) { 51 const std::string& dir_name, const FilePath& backing_filepath) {
49 if (storage_option_ == IN_MEMORY) { 52 if (storage_option_ == IN_MEMORY) {
50 return scoped_ptr<syncable::DirectoryBackingStore>( 53 return scoped_ptr<syncable::DirectoryBackingStore>(
51 new syncable::InMemoryDirectoryBackingStore(dir_name)); 54 new syncable::InMemoryDirectoryBackingStore(dir_name));
52 } else { 55 } else {
53 return scoped_ptr<syncable::DirectoryBackingStore>( 56 return scoped_ptr<syncable::DirectoryBackingStore>(
54 new syncable::OnDiskDirectoryBackingStore(dir_name, 57 new syncable::OnDiskDirectoryBackingStore(dir_name,
55 backing_filepath)); 58 backing_filepath));
56 } 59 }
57 } 60 }
58 61
59 } // namespace syncer 62 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698