| Index: chrome/browser/profiles/profile_impl.cc
 | 
| ===================================================================
 | 
| --- chrome/browser/profiles/profile_impl.cc	(revision 98647)
 | 
| +++ chrome/browser/profiles/profile_impl.cc	(working copy)
 | 
| @@ -683,6 +683,11 @@
 | 
|    // Remove pref observers
 | 
|    pref_change_registrar_.RemoveAll();
 | 
|  
 | 
| +  // The sync service needs to be deleted before the services it calls.
 | 
| +  // TODO(stevet): Make ProfileSyncService into a PKS and let the PDM take care
 | 
| +  // of the cleanup below.
 | 
| +  sync_service_.reset();
 | 
| +
 | 
|    ProfileDependencyManager::GetInstance()->DestroyProfileServices(this);
 | 
|  
 | 
|    if (db_tracker_) {
 | 
| @@ -701,9 +706,6 @@
 | 
|      download_manager_ = NULL;
 | 
|    }
 | 
|  
 | 
| -  // The sync service needs to be deleted before the services it calls.
 | 
| -  sync_service_.reset();
 | 
| -
 | 
|    // Password store uses WebDB, shut it down before the WebDB has been shutdown.
 | 
|    if (password_store_.get())
 | 
|      password_store_->Shutdown();
 | 
| 
 |