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

Side by Side Diff: extensions/browser/event_router.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
« no previous file with comments | « extensions/browser/event_router.h ('k') | extensions/browser/extension_host.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 "extensions/browser/event_router.h" 5 #include "extensions/browser/event_router.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <tuple> 9 #include <tuple>
10 #include <utility> 10 #include <utility>
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 std::set<std::string> registered_events = 816 std::set<std::string> registered_events =
817 GetRegisteredEvents(extension->id()); 817 GetRegisteredEvents(extension->id());
818 listeners_.LoadUnfilteredLazyListeners(extension->id(), registered_events); 818 listeners_.LoadUnfilteredLazyListeners(extension->id(), registered_events);
819 const DictionaryValue* filtered_events = GetFilteredEvents(extension->id()); 819 const DictionaryValue* filtered_events = GetFilteredEvents(extension->id());
820 if (filtered_events) 820 if (filtered_events)
821 listeners_.LoadFilteredLazyListeners(extension->id(), *filtered_events); 821 listeners_.LoadFilteredLazyListeners(extension->id(), *filtered_events);
822 } 822 }
823 823
824 void EventRouter::OnExtensionUnloaded(content::BrowserContext* browser_context, 824 void EventRouter::OnExtensionUnloaded(content::BrowserContext* browser_context,
825 const Extension* extension, 825 const Extension* extension,
826 UnloadedExtensionInfo::Reason reason) { 826 UnloadedExtensionReason reason) {
827 // Remove all registered listeners from our cache. 827 // Remove all registered listeners from our cache.
828 listeners_.RemoveListenersForExtension(extension->id()); 828 listeners_.RemoveListenersForExtension(extension->id());
829 } 829 }
830 830
831 Event::Event(events::HistogramValue histogram_value, 831 Event::Event(events::HistogramValue histogram_value,
832 const std::string& event_name, 832 const std::string& event_name,
833 std::unique_ptr<base::ListValue> event_args) 833 std::unique_ptr<base::ListValue> event_args)
834 : Event(histogram_value, event_name, std::move(event_args), nullptr) {} 834 : Event(histogram_value, event_name, std::move(event_args), nullptr) {}
835 835
836 Event::Event(events::HistogramValue histogram_value, 836 Event::Event(events::HistogramValue histogram_value,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 const std::string& extension_id, 883 const std::string& extension_id,
884 const GURL& listener_url, 884 const GURL& listener_url,
885 content::BrowserContext* browser_context) 885 content::BrowserContext* browser_context)
886 : event_name(event_name), 886 : event_name(event_name),
887 extension_id(extension_id), 887 extension_id(extension_id),
888 listener_url(listener_url), 888 listener_url(listener_url),
889 browser_context(browser_context) { 889 browser_context(browser_context) {
890 } 890 }
891 891
892 } // namespace extensions 892 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/event_router.h ('k') | extensions/browser/extension_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698