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

Unified Diff: chrome/browser/sync/profile_sync_service_unittest.cc

Issue 11037007: [Sync] Require ProfileSyncService to have an uninitialized backend on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/profile_sync_service_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index 7d9a79c56c57e3af47367fced9316bf4a4976b4b..6eacdeb037b2a3154dff292ad4f4b81b429ab999 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -75,6 +75,9 @@ class ProfileSyncServiceTestHarness {
void TearDown() {
// Kill the service before the profile.
+ if (service.get()) {
+ service->Shutdown();
+ }
service.reset();
profile.reset();
// Pump messages posted by the sync thread (which may end up
@@ -370,6 +373,7 @@ TEST_F(ProfileSyncServiceTest, TestStartupWithOldSyncData) {
// Stop the service so we can read the new Sync Data files that were
// created.
+ harness_.service->Shutdown();
harness_.service.reset();
// This file should have been deleted when the whole directory was nuked.

Powered by Google App Engine
This is Rietveld 408576698