summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/test
diff options
context:
space:
mode:
authorearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-25 19:12:17 +0000
committerearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-25 19:12:17 +0000
commitbfd80f0bbc586d6254724530c1dbe376fd18e7eb (patch)
treef2bbe743018b4bc5ffef0c67e7a45805ac520aa5 /sync/internal_api/test
parentaaffe1b11632e13935ef54148bfd6373e2c08cd7 (diff)
downloadchromium_src-bfd80f0bbc586d6254724530c1dbe376fd18e7eb.zip
chromium_src-bfd80f0bbc586d6254724530c1dbe376fd18e7eb.tar.gz
chromium_src-bfd80f0bbc586d6254724530c1dbe376fd18e7eb.tar.bz2
Revert 213642 "Lock-free shutdown of profile sync service. Chang..."
Reverting due to memory leaks. BUG=264325 > Lock-free shutdown of profile sync service. Changes include: > * Disconnect non-frontend processor/associator to stop accessing directory > so that sync backend can be shut down without waiting. > * Change non-frontend controller so that creation/destruction of > processor/associator doesn't depend on valid controller. So > scoped wait on stopping controller can be removed. > * Move sync thread to PSS. It's created when starting first backend and > destroyed on last browser thread. > > BUG=19757 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210333 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210955 > > Review URL: https://chromiumcodereview.appspot.com/16770005 TBR=haitaol@chromium.org Review URL: https://codereview.chromium.org/20374005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/test')
-rw-r--r--sync/internal_api/test/fake_sync_manager.cc14
-rw-r--r--sync/internal_api/test/test_internal_components_factory.cc2
2 files changed, 10 insertions, 6 deletions
diff --git a/sync/internal_api/test/fake_sync_manager.cc b/sync/internal_api/test/fake_sync_manager.cc
index cac310b..7a6d6a4 100644
--- a/sync/internal_api/test/fake_sync_manager.cc
+++ b/sync/internal_api/test/fake_sync_manager.cc
@@ -81,16 +81,17 @@ void FakeSyncManager::Init(
bool use_ssl,
scoped_ptr<HttpPostProviderFactory> post_factory,
const std::vector<ModelSafeWorker*>& workers,
- ExtensionsActivity* extensions_activity,
+ ExtensionsActivityMonitor* extensions_activity_monitor,
ChangeDelegate* change_delegate,
const SyncCredentials& credentials,
const std::string& invalidator_client_id,
const std::string& restored_key_for_bootstrapping,
const std::string& restored_keystore_key_for_bootstrapping,
- InternalComponentsFactory* internal_components_factory,
+ scoped_ptr<InternalComponentsFactory> internal_components_factory,
Encryptor* encryptor,
- scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler,
- ReportUnrecoverableErrorFunction report_unrecoverable_error_function,
+ UnrecoverableErrorHandler* unrecoverable_error_handler,
+ ReportUnrecoverableErrorFunction
+ report_unrecoverable_error_function,
bool use_oauth2_token) {
sync_task_runner_ = base::ThreadTaskRunnerHandle::Get();
PurgePartiallySyncedTypes();
@@ -209,7 +210,10 @@ void FakeSyncManager::SaveChanges() {
// Do nothing.
}
-void FakeSyncManager::StopSyncingForShutdown() {
+void FakeSyncManager::StopSyncingForShutdown(const base::Closure& callback) {
+ if (!sync_task_runner_->PostTask(FROM_HERE, callback)) {
+ NOTREACHED();
+ }
}
void FakeSyncManager::ShutdownOnSyncThread() {
diff --git a/sync/internal_api/test/test_internal_components_factory.cc b/sync/internal_api/test/test_internal_components_factory.cc
index 03d2d82..154c58cc 100644
--- a/sync/internal_api/test/test_internal_components_factory.cc
+++ b/sync/internal_api/test/test_internal_components_factory.cc
@@ -31,7 +31,7 @@ TestInternalComponentsFactory::BuildContext(
ServerConnectionManager* connection_manager,
syncable::Directory* directory,
const std::vector<ModelSafeWorker*>& workers,
- ExtensionsActivity* monitor,
+ ExtensionsActivityMonitor* monitor,
const std::vector<SyncEngineEventListener*>& listeners,
sessions::DebugInfoGetter* debug_info_getter,
TrafficRecorder* traffic_recorder,