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

Side by Side Diff: chrome/browser/background/background_contents_service.cc

Issue 289283013: Revert of Unload all apps / extensions when deleting a profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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 | « no previous file | chrome/browser/chrome_notification_types.h » ('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/background/background_contents_service.h" 5 #include "chrome/browser/background/background_contents_service.h"
6 6
7 #include "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // Restart the extension. 461 // Restart the extension.
462 RestartForceInstalledExtensionOnCrash(extension, profile); 462 RestartForceInstalledExtensionOnCrash(extension, profile);
463 } 463 }
464 break; 464 break;
465 } 465 }
466 case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: 466 case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED:
467 switch (content::Details<UnloadedExtensionInfo>(details)->reason) { 467 switch (content::Details<UnloadedExtensionInfo>(details)->reason) {
468 case UnloadedExtensionInfo::REASON_DISABLE: // Fall through. 468 case UnloadedExtensionInfo::REASON_DISABLE: // Fall through.
469 case UnloadedExtensionInfo::REASON_TERMINATE: // Fall through. 469 case UnloadedExtensionInfo::REASON_TERMINATE: // Fall through.
470 case UnloadedExtensionInfo::REASON_UNINSTALL: // Fall through. 470 case UnloadedExtensionInfo::REASON_UNINSTALL: // Fall through.
471 case UnloadedExtensionInfo::REASON_BLACKLIST: // Fall through. 471 case UnloadedExtensionInfo::REASON_BLACKLIST:
472 case UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN:
473 ShutdownAssociatedBackgroundContents(base::ASCIIToUTF16( 472 ShutdownAssociatedBackgroundContents(base::ASCIIToUTF16(
474 content::Details<UnloadedExtensionInfo>(details)-> 473 content::Details<UnloadedExtensionInfo>(details)->
475 extension->id())); 474 extension->id()));
476 SendChangeNotification(content::Source<Profile>(source).ptr()); 475 SendChangeNotification(content::Source<Profile>(source).ptr());
477 break; 476 break;
478 case UnloadedExtensionInfo::REASON_UPDATE: { 477 case UnloadedExtensionInfo::REASON_UPDATE: {
479 // If there is a manifest specified background page, then shut it down 478 // If there is a manifest specified background page, then shut it down
480 // here, since if the updated extension still has the background page, 479 // here, since if the updated extension still has the background page,
481 // then it will be loaded from LOADED callback. Otherwise, leave 480 // then it will be loaded from LOADED callback. Otherwise, leave
482 // BackgroundContents in place. 481 // BackgroundContents in place.
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 bool user_gesture, 786 bool user_gesture,
788 bool* was_blocked) { 787 bool* was_blocked) {
789 Browser* browser = chrome::FindLastActiveWithProfile( 788 Browser* browser = chrome::FindLastActiveWithProfile(
790 Profile::FromBrowserContext(new_contents->GetBrowserContext()), 789 Profile::FromBrowserContext(new_contents->GetBrowserContext()),
791 chrome::GetActiveDesktop()); 790 chrome::GetActiveDesktop());
792 if (browser) { 791 if (browser) {
793 chrome::AddWebContents(browser, NULL, new_contents, disposition, 792 chrome::AddWebContents(browser, NULL, new_contents, disposition,
794 initial_pos, user_gesture, was_blocked); 793 initial_pos, user_gesture, was_blocked);
795 } 794 }
796 } 795 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698