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. |