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

Side by Side Diff: chrome/browser/extensions/api/management/management_api.cc

Issue 386033002: Prune shared extendion module after extension updating. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review issues Created 6 years, 5 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
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/extensions/api/management/management_api.h" 5 #include "chrome/browser/extensions/api/management/management_api.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 940
941 void ManagementEventRouter::OnExtensionUnloaded( 941 void ManagementEventRouter::OnExtensionUnloaded(
942 content::BrowserContext* browser_context, 942 content::BrowserContext* browser_context,
943 const Extension* extension, 943 const Extension* extension,
944 UnloadedExtensionInfo::Reason reason) { 944 UnloadedExtensionInfo::Reason reason) {
945 BroadcastEvent(extension, management::OnDisabled::kEventName); 945 BroadcastEvent(extension, management::OnDisabled::kEventName);
946 } 946 }
947 947
948 void ManagementEventRouter::OnExtensionInstalled( 948 void ManagementEventRouter::OnExtensionInstalled(
949 content::BrowserContext* browser_context, 949 content::BrowserContext* browser_context,
950 const Extension* extension) { 950 const Extension* extension,
951 bool is_update) {
951 BroadcastEvent(extension, management::OnInstalled::kEventName); 952 BroadcastEvent(extension, management::OnInstalled::kEventName);
952 } 953 }
953 954
954 void ManagementEventRouter::OnExtensionUninstalled( 955 void ManagementEventRouter::OnExtensionUninstalled(
955 content::BrowserContext* browser_context, 956 content::BrowserContext* browser_context,
956 const Extension* extension) { 957 const Extension* extension) {
957 BroadcastEvent(extension, management::OnUninstalled::kEventName); 958 BroadcastEvent(extension, management::OnUninstalled::kEventName);
958 } 959 }
959 960
960 void ManagementEventRouter::BroadcastEvent(const Extension* extension, 961 void ManagementEventRouter::BroadcastEvent(const Extension* extension,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 ManagementAPI::GetFactoryInstance() { 999 ManagementAPI::GetFactoryInstance() {
999 return g_factory.Pointer(); 1000 return g_factory.Pointer();
1000 } 1001 }
1001 1002
1002 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { 1003 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) {
1003 management_event_router_.reset(new ManagementEventRouter(browser_context_)); 1004 management_event_router_.reset(new ManagementEventRouter(browser_context_));
1004 EventRouter::Get(browser_context_)->UnregisterObserver(this); 1005 EventRouter::Get(browser_context_)->UnregisterObserver(this);
1005 } 1006 }
1006 1007
1007 } // namespace extensions 1008 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/management/management_api.h ('k') | chrome/browser/extensions/error_console/error_console.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698