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

Side by Side Diff: components/sync/core/internal_components_factory_impl.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
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/internal_components_factory_impl.h" 5 #include "components/sync/core/internal_components_factory_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "sync/engine/backoff_delay_provider.h" 10 #include "components/sync/engine_impl/backoff_delay_provider.h"
11 #include "sync/engine/syncer.h" 11 #include "components/sync/engine_impl/sync_scheduler_impl.h"
12 #include "sync/engine/sync_scheduler_impl.h" 12 #include "components/sync/engine_impl/syncer.h"
13 #include "sync/sessions/sync_session_context.h" 13 #include "components/sync/sessions_impl/sync_session_context.h"
14 #include "sync/syncable/on_disk_directory_backing_store.h" 14 #include "components/sync/syncable/on_disk_directory_backing_store.h"
15 15
16 using base::TimeDelta; 16 using base::TimeDelta;
17 17
18 namespace syncer { 18 namespace syncer {
19 19
20 InternalComponentsFactoryImpl::InternalComponentsFactoryImpl( 20 InternalComponentsFactoryImpl::InternalComponentsFactoryImpl(
21 const Switches& switches) : switches_(switches) { 21 const Switches& switches)
22 } 22 : switches_(switches) {}
23 23
24 InternalComponentsFactoryImpl::~InternalComponentsFactoryImpl() { } 24 InternalComponentsFactoryImpl::~InternalComponentsFactoryImpl() {}
25 25
26 std::unique_ptr<SyncScheduler> InternalComponentsFactoryImpl::BuildScheduler( 26 std::unique_ptr<SyncScheduler> InternalComponentsFactoryImpl::BuildScheduler(
27 const std::string& name, 27 const std::string& name,
28 sessions::SyncSessionContext* context, 28 sessions::SyncSessionContext* context,
29 CancelationSignal* cancelation_signal) { 29 CancelationSignal* cancelation_signal) {
30 std::unique_ptr<BackoffDelayProvider> delay( 30 std::unique_ptr<BackoffDelayProvider> delay(
31 BackoffDelayProvider::FromDefaults()); 31 BackoffDelayProvider::FromDefaults());
32 32
33 if (switches_.backoff_override == BACKOFF_SHORT_INITIAL_RETRY_OVERRIDE) 33 if (switches_.backoff_override == BACKOFF_SHORT_INITIAL_RETRY_OVERRIDE)
34 delay.reset(BackoffDelayProvider::WithShortInitialRetryOverride()); 34 delay.reset(BackoffDelayProvider::WithShortInitialRetryOverride());
(...skipping 28 matching lines...) Expand all
63 const base::FilePath& backing_filepath) { 63 const base::FilePath& backing_filepath) {
64 if (storage == STORAGE_ON_DISK) { 64 if (storage == STORAGE_ON_DISK) {
65 return std::unique_ptr<syncable::DirectoryBackingStore>( 65 return std::unique_ptr<syncable::DirectoryBackingStore>(
66 new syncable::OnDiskDirectoryBackingStore(dir_name, backing_filepath)); 66 new syncable::OnDiskDirectoryBackingStore(dir_name, backing_filepath));
67 } else { 67 } else {
68 NOTREACHED(); 68 NOTREACHED();
69 return std::unique_ptr<syncable::DirectoryBackingStore>(); 69 return std::unique_ptr<syncable::DirectoryBackingStore>();
70 } 70 }
71 } 71 }
72 72
73 InternalComponentsFactory::Switches 73 InternalComponentsFactory::Switches InternalComponentsFactoryImpl::GetSwitches()
74 InternalComponentsFactoryImpl::GetSwitches() const { 74 const {
75 return switches_; 75 return switches_;
76 } 76 }
77 77
78 } // namespace syncer 78 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/core/internal_components_factory_impl.h ('k') | components/sync/core/model_type_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698