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

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 297483007: Revert 270890 "Unload all apps / extensions immediately when del..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2006/src/
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_manager.h" 5 #include "chrome/browser/profiles/profile_manager.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 return true; 1066 return true;
1067 } 1067 }
1068 1068
1069 void ProfileManager::FinishDeletingProfile(const base::FilePath& profile_dir) { 1069 void ProfileManager::FinishDeletingProfile(const base::FilePath& profile_dir) {
1070 ProfileInfoCache& cache = GetProfileInfoCache(); 1070 ProfileInfoCache& cache = GetProfileInfoCache();
1071 // TODO(sail): Due to bug 88586 we don't delete the profile instance. Once we 1071 // TODO(sail): Due to bug 88586 we don't delete the profile instance. Once we
1072 // start deleting the profile instance we need to close background apps too. 1072 // start deleting the profile instance we need to close background apps too.
1073 Profile* profile = GetProfileByPath(profile_dir); 1073 Profile* profile = GetProfileByPath(profile_dir);
1074 1074
1075 if (profile) { 1075 if (profile) {
1076 // TODO: Migrate additional code in this block to observe this notification
1077 // instead of being implemented here.
1078 content::NotificationService::current()->Notify(
1079 chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED,
1080 content::Source<Profile>(profile),
1081 content::NotificationService::NoDetails());
1082
1083 // By this point, all in-progress downloads for the profile being deleted 1076 // By this point, all in-progress downloads for the profile being deleted
1084 // must have been canceled (crbug.com/336725). 1077 // must have been canceled (crbug.com/336725).
1085 DCHECK(DownloadServiceFactory::GetForBrowserContext(profile)-> 1078 DCHECK(DownloadServiceFactory::GetForBrowserContext(profile)->
1086 NonMaliciousDownloadCount() == 0); 1079 NonMaliciousDownloadCount() == 0);
1087 BrowserList::CloseAllBrowsersWithProfile(profile); 1080 BrowserList::CloseAllBrowsersWithProfile(profile);
1088 1081
1089 // Disable sync for doomed profile. 1082 // Disable sync for doomed profile.
1090 if (ProfileSyncServiceFactory::GetInstance()->HasProfileSyncService( 1083 if (ProfileSyncServiceFactory::GetInstance()->HasProfileSyncService(
1091 profile)) { 1084 profile)) {
1092 ProfileSyncServiceFactory::GetInstance()->GetForProfile( 1085 ProfileSyncServiceFactory::GetInstance()->GetForProfile(
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 last_non_managed_profile_path.BaseName().MaybeAsASCII()); 1274 last_non_managed_profile_path.BaseName().MaybeAsASCII());
1282 FinishDeletingProfile(profile_to_delete_path); 1275 FinishDeletingProfile(profile_to_delete_path);
1283 } 1276 }
1284 } 1277 }
1285 } 1278 }
1286 #endif 1279 #endif
1287 1280
1288 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1281 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1289 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1282 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1290 } 1283 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698