summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/test/fake_sync_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sync/internal_api/test/fake_sync_manager.cc')
-rw-r--r--sync/internal_api/test/fake_sync_manager.cc66
1 files changed, 32 insertions, 34 deletions
diff --git a/sync/internal_api/test/fake_sync_manager.cc b/sync/internal_api/test/fake_sync_manager.cc
index 85a0a69..1951e7f 100644
--- a/sync/internal_api/test/fake_sync_manager.cc
+++ b/sync/internal_api/test/fake_sync_manager.cc
@@ -18,57 +18,55 @@ FakeSyncManager::FakeSyncManager() {
FakeSyncManager::~FakeSyncManager() {
}
-void FakeSyncManager::set_initial_sync_ended_types(
- syncer::ModelTypeSet types) {
+void FakeSyncManager::set_initial_sync_ended_types(ModelTypeSet types) {
initial_sync_ended_types_ = types;
}
-void FakeSyncManager::set_progress_marker_types(
- syncer::ModelTypeSet types) {
+void FakeSyncManager::set_progress_marker_types(ModelTypeSet types) {
progress_marker_types_ = types;
}
-void FakeSyncManager::set_configure_fail_types(syncer::ModelTypeSet types) {
+void FakeSyncManager::set_configure_fail_types(ModelTypeSet types) {
configure_fail_types_ = types;
}
-syncer::ModelTypeSet FakeSyncManager::GetAndResetCleanedTypes() {
- syncer::ModelTypeSet cleaned_types = cleaned_types_;
+ModelTypeSet FakeSyncManager::GetAndResetCleanedTypes() {
+ ModelTypeSet cleaned_types = cleaned_types_;
cleaned_types_.Clear();
return cleaned_types;
}
-syncer::ModelTypeSet FakeSyncManager::GetAndResetDownloadedTypes() {
- syncer::ModelTypeSet downloaded_types = downloaded_types_;
+ModelTypeSet FakeSyncManager::GetAndResetDownloadedTypes() {
+ ModelTypeSet downloaded_types = downloaded_types_;
downloaded_types_.Clear();
return downloaded_types;
}
bool FakeSyncManager::Init(
const FilePath& database_location,
- const syncer::WeakHandle<syncer::JsEventHandler>& event_handler,
+ const WeakHandle<JsEventHandler>& event_handler,
const std::string& sync_server_and_path,
int sync_server_port,
bool use_ssl,
const scoped_refptr<base::TaskRunner>& blocking_task_runner,
scoped_ptr<HttpPostProviderFactory> post_factory,
- const syncer::ModelSafeRoutingInfo& model_safe_routing_info,
- const std::vector<syncer::ModelSafeWorker*>& workers,
- syncer::ExtensionsActivityMonitor* extensions_activity_monitor,
+ const ModelSafeRoutingInfo& model_safe_routing_info,
+ const std::vector<ModelSafeWorker*>& workers,
+ ExtensionsActivityMonitor* extensions_activity_monitor,
ChangeDelegate* change_delegate,
const SyncCredentials& credentials,
- scoped_ptr<syncer::SyncNotifier> sync_notifier,
+ scoped_ptr<SyncNotifier> sync_notifier,
const std::string& restored_key_for_bootstrapping,
scoped_ptr<InternalComponentsFactory> internal_components_factory,
- syncer::Encryptor* encryptor,
- syncer::UnrecoverableErrorHandler* unrecoverable_error_handler,
- syncer::ReportUnrecoverableErrorFunction
+ Encryptor* encryptor,
+ UnrecoverableErrorHandler* unrecoverable_error_handler,
+ ReportUnrecoverableErrorFunction
report_unrecoverable_error_function) {
sync_loop_ = MessageLoop::current();
PurgePartiallySyncedTypes();
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
OnInitializationComplete(
- syncer::WeakHandle<syncer::JsBackend>(),
+ WeakHandle<JsBackend>(),
true));
return true;
}
@@ -77,20 +75,20 @@ void FakeSyncManager::ThrowUnrecoverableError() {
NOTIMPLEMENTED();
}
-syncer::ModelTypeSet FakeSyncManager::InitialSyncEndedTypes() {
+ModelTypeSet FakeSyncManager::InitialSyncEndedTypes() {
return initial_sync_ended_types_;
}
-syncer::ModelTypeSet FakeSyncManager::GetTypesWithEmptyProgressMarkerToken(
- syncer::ModelTypeSet types) {
- syncer::ModelTypeSet empty_types = types;
+ModelTypeSet FakeSyncManager::GetTypesWithEmptyProgressMarkerToken(
+ ModelTypeSet types) {
+ ModelTypeSet empty_types = types;
empty_types.RemoveAll(progress_marker_types_);
return empty_types;
}
bool FakeSyncManager::PurgePartiallySyncedTypes() {
ModelTypeSet partial_types;
- for (syncer::ModelTypeSet::Iterator i = progress_marker_types_.First();
+ 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());
@@ -103,12 +101,12 @@ void FakeSyncManager::UpdateCredentials(const SyncCredentials& credentials) {
NOTIMPLEMENTED();
}
-void FakeSyncManager::UpdateEnabledTypes(const syncer::ModelTypeSet& types) {
+void FakeSyncManager::UpdateEnabledTypes(const ModelTypeSet& types) {
// Do nothing.
}
void FakeSyncManager::StartSyncingNormally(
- const syncer::ModelSafeRoutingInfo& routing_info) {
+ const ModelSafeRoutingInfo& routing_info) {
// Do nothing.
}
@@ -123,19 +121,19 @@ void FakeSyncManager::SetDecryptionPassphrase(const std::string& passphrase) {
void FakeSyncManager::ConfigureSyncer(
ConfigureReason reason,
- const syncer::ModelTypeSet& types_to_config,
- const syncer::ModelSafeRoutingInfo& new_routing_info,
+ const ModelTypeSet& types_to_config,
+ const ModelSafeRoutingInfo& new_routing_info,
const base::Closure& ready_task,
const base::Closure& retry_task) {
- syncer::ModelTypeSet enabled_types = GetRoutingInfoTypes(new_routing_info);
- syncer::ModelTypeSet disabled_types = Difference(
- syncer::ModelTypeSet::All(), enabled_types);
- syncer::ModelTypeSet success_types = types_to_config;
+ ModelTypeSet enabled_types = GetRoutingInfoTypes(new_routing_info);
+ ModelTypeSet disabled_types = Difference(
+ ModelTypeSet::All(), enabled_types);
+ ModelTypeSet success_types = types_to_config;
success_types.RemoveAll(configure_fail_types_);
DVLOG(1) << "Faking configuration. Downloading: "
- << syncer::ModelTypeSetToString(success_types) << ". Cleaning: "
- << syncer::ModelTypeSetToString(disabled_types);
+ << ModelTypeSetToString(success_types) << ". Cleaning: "
+ << ModelTypeSetToString(disabled_types);
// Simulate cleaning up disabled types.
// TODO(sync): consider only cleaning those types that were recently disabled,
@@ -198,7 +196,7 @@ void FakeSyncManager::EnableEncryptEverything() {
NOTIMPLEMENTED();
}
-bool FakeSyncManager::ReceivedExperiment(syncer::Experiments* experiments) {
+bool FakeSyncManager::ReceivedExperiment(Experiments* experiments) {
return false;
}