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

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

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 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
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 "extensions/browser/api/management/management_api.h" 5 #include "extensions/browser/api/management/management_api.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 void ManagementEventRouter::OnExtensionLoaded( 793 void ManagementEventRouter::OnExtensionLoaded(
794 content::BrowserContext* browser_context, 794 content::BrowserContext* browser_context,
795 const Extension* extension) { 795 const Extension* extension) {
796 BroadcastEvent(extension, events::MANAGEMENT_ON_ENABLED, 796 BroadcastEvent(extension, events::MANAGEMENT_ON_ENABLED,
797 management::OnEnabled::kEventName); 797 management::OnEnabled::kEventName);
798 } 798 }
799 799
800 void ManagementEventRouter::OnExtensionUnloaded( 800 void ManagementEventRouter::OnExtensionUnloaded(
801 content::BrowserContext* browser_context, 801 content::BrowserContext* browser_context,
802 const Extension* extension, 802 const Extension* extension,
803 UnloadedExtensionInfo::Reason reason) { 803 UnloadedExtensionReason reason) {
804 BroadcastEvent(extension, events::MANAGEMENT_ON_DISABLED, 804 BroadcastEvent(extension, events::MANAGEMENT_ON_DISABLED,
805 management::OnDisabled::kEventName); 805 management::OnDisabled::kEventName);
806 } 806 }
807 807
808 void ManagementEventRouter::OnExtensionInstalled( 808 void ManagementEventRouter::OnExtensionInstalled(
809 content::BrowserContext* browser_context, 809 content::BrowserContext* browser_context,
810 const Extension* extension, 810 const Extension* extension,
811 bool is_update) { 811 bool is_update) {
812 BroadcastEvent(extension, events::MANAGEMENT_ON_INSTALLED, 812 BroadcastEvent(extension, events::MANAGEMENT_ON_INSTALLED,
813 management::OnInstalled::kEventName); 813 management::OnInstalled::kEventName);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 ManagementAPI::GetFactoryInstance() { 865 ManagementAPI::GetFactoryInstance() {
866 return g_factory.Pointer(); 866 return g_factory.Pointer();
867 } 867 }
868 868
869 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { 869 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) {
870 management_event_router_.reset(new ManagementEventRouter(browser_context_)); 870 management_event_router_.reset(new ManagementEventRouter(browser_context_));
871 EventRouter::Get(browser_context_)->UnregisterObserver(this); 871 EventRouter::Get(browser_context_)->UnregisterObserver(this);
872 } 872 }
873 873
874 } // namespace extensions 874 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698