Index: components/sync/core_impl/test/fake_sync_manager.cc |
diff --git a/sync/internal_api/test/fake_sync_manager.cc b/components/sync/core_impl/test/fake_sync_manager.cc |
similarity index 83% |
rename from sync/internal_api/test/fake_sync_manager.cc |
rename to components/sync/core_impl/test/fake_sync_manager.cc |
index a0883f893935f3ea275ebaa26ba22de62ce46257..08ff5b6c3503dc3fed1414f3234e78f0e9a781dc 100644 |
--- a/sync/internal_api/test/fake_sync_manager.cc |
+++ b/components/sync/core_impl/test/fake_sync_manager.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "sync/internal_api/public/test/fake_sync_manager.h" |
+#include "components/sync/core/test/fake_sync_manager.h" |
#include <cstddef> |
@@ -15,12 +15,12 @@ |
#include "base/sequenced_task_runner.h" |
#include "base/single_thread_task_runner.h" |
#include "base/threading/thread_task_runner_handle.h" |
-#include "sync/internal_api/public/http_post_provider_factory.h" |
-#include "sync/internal_api/public/internal_components_factory.h" |
-#include "sync/internal_api/public/test/fake_model_type_connector.h" |
-#include "sync/internal_api/public/util/weak_handle.h" |
-#include "sync/syncable/directory.h" |
-#include "sync/test/fake_sync_encryption_handler.h" |
+#include "components/sync/base/weak_handle.h" |
+#include "components/sync/core/http_post_provider_factory.h" |
+#include "components/sync/core/internal_components_factory.h" |
+#include "components/sync/core/test/fake_model_type_connector.h" |
+#include "components/sync/syncable/directory.h" |
+#include "components/sync/test/fake_sync_encryption_handler.h" |
class GURL; |
@@ -28,12 +28,12 @@ namespace syncer { |
FakeSyncManager::FakeSyncManager(ModelTypeSet initial_sync_ended_types, |
ModelTypeSet progress_marker_types, |
- ModelTypeSet configure_fail_types) : |
- initial_sync_ended_types_(initial_sync_ended_types), |
- progress_marker_types_(progress_marker_types), |
- configure_fail_types_(configure_fail_types), |
- last_configure_reason_(CONFIGURE_REASON_UNKNOWN), |
- num_invalidations_received_(0) { |
+ ModelTypeSet configure_fail_types) |
+ : initial_sync_ended_types_(initial_sync_ended_types), |
+ progress_marker_types_(progress_marker_types), |
+ configure_fail_types_(configure_fail_types), |
+ last_configure_reason_(CONFIGURE_REASON_UNKNOWN), |
+ num_invalidations_received_(0) { |
fake_encryption_handler_.reset(new FakeSyncEncryptionHandler()); |
} |
@@ -71,9 +71,7 @@ void FakeSyncManager::WaitForSyncThread() { |
// Post a task to |sync_task_runner_| and block until it runs. |
base::RunLoop run_loop; |
if (!sync_task_runner_->PostTaskAndReply( |
- FROM_HERE, |
- base::Bind(&base::DoNothing), |
- run_loop.QuitClosure())) { |
+ FROM_HERE, base::Bind(&base::DoNothing), run_loop.QuitClosure())) { |
NOTREACHED(); |
} |
run_loop.Run(); |
@@ -85,16 +83,16 @@ void FakeSyncManager::Init(InitArgs* args) { |
test_user_share_.SetUp(); |
UserShare* share = test_user_share_.user_share(); |
- for (ModelTypeSet::Iterator it = initial_sync_ended_types_.First(); |
- it.Good(); it.Inc()) { |
+ for (ModelTypeSet::Iterator it = initial_sync_ended_types_.First(); it.Good(); |
+ it.Inc()) { |
TestUserShare::CreateRoot(it.Get(), share); |
} |
- FOR_EACH_OBSERVER(SyncManager::Observer, observers_, |
- OnInitializationComplete( |
- WeakHandle<JsBackend>(), |
- WeakHandle<DataTypeDebugInfoListener>(), |
- true, initial_sync_ended_types_)); |
+ FOR_EACH_OBSERVER( |
+ SyncManager::Observer, observers_, |
+ OnInitializationComplete(WeakHandle<JsBackend>(), |
+ WeakHandle<DataTypeDebugInfoListener>(), true, |
+ initial_sync_ended_types_)); |
} |
ModelTypeSet FakeSyncManager::InitialSyncEndedTypes() { |
@@ -110,8 +108,8 @@ ModelTypeSet FakeSyncManager::GetTypesWithEmptyProgressMarkerToken( |
bool FakeSyncManager::PurgePartiallySyncedTypes() { |
ModelTypeSet partial_types; |
- for (ModelTypeSet::Iterator i = progress_marker_types_.First(); |
- i.Good(); i.Inc()) { |
+ for (ModelTypeSet::Iterator i = progress_marker_types_.First(); i.Good(); |
+ i.Inc()) { |
if (!initial_sync_ended_types_.Has(i.Get())) |
partial_types.Put(i.Get()); |
} |
@@ -125,7 +123,8 @@ void FakeSyncManager::UpdateCredentials(const SyncCredentials& credentials) { |
} |
void FakeSyncManager::StartSyncingNormally( |
- const ModelSafeRoutingInfo& routing_info, base::Time last_poll_time) { |
+ const ModelSafeRoutingInfo& routing_info, |
+ base::Time last_poll_time) { |
// Do nothing. |
} |
@@ -144,14 +143,12 @@ void FakeSyncManager::ConfigureSyncer( |
success_types.RemoveAll(configure_fail_types_); |
DVLOG(1) << "Faking configuration. Downloading: " |
- << ModelTypeSetToString(success_types) << ". Cleaning: " |
- << ModelTypeSetToString(to_purge); |
+ << ModelTypeSetToString(success_types) |
+ << ". Cleaning: " << ModelTypeSetToString(to_purge); |
// Update our fake directory by clearing and fake-downloading as necessary. |
UserShare* share = GetUserShare(); |
- share->directory->PurgeEntriesWithTypeIn(to_purge, |
- to_journal, |
- to_unapply); |
+ share->directory->PurgeEntriesWithTypeIn(to_purge, to_journal, to_unapply); |
for (ModelTypeSet::Iterator it = success_types.First(); it.Good(); it.Inc()) { |
// We must be careful to not create the same root node twice. |
if (!initial_sync_ended_types_.Has(it.Get())) { |