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

Side by Side Diff: extensions/browser/event_router.cc

Issue 2108623005: extensions: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 extension_prefs_(extension_prefs), 172 extension_prefs_(extension_prefs),
173 extension_registry_observer_(this), 173 extension_registry_observer_(this),
174 listeners_(this) { 174 listeners_(this) {
175 registrar_.Add(this, 175 registrar_.Add(this,
176 extensions::NOTIFICATION_EXTENSION_ENABLED, 176 extensions::NOTIFICATION_EXTENSION_ENABLED,
177 content::Source<BrowserContext>(browser_context_)); 177 content::Source<BrowserContext>(browser_context_));
178 extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context_)); 178 extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context_));
179 } 179 }
180 180
181 EventRouter::~EventRouter() { 181 EventRouter::~EventRouter() {
182 for (auto process : observed_process_set_) 182 for (auto* process : observed_process_set_)
183 process->RemoveObserver(this); 183 process->RemoveObserver(this);
184 } 184 }
185 185
186 void EventRouter::AddEventListener(const std::string& event_name, 186 void EventRouter::AddEventListener(const std::string& event_name,
187 content::RenderProcessHost* process, 187 content::RenderProcessHost* process,
188 const std::string& extension_id) { 188 const std::string& extension_id) {
189 listeners_.AddListener(EventListener::ForExtension( 189 listeners_.AddListener(EventListener::ForExtension(
190 event_name, extension_id, process, std::unique_ptr<DictionaryValue>())); 190 event_name, extension_id, process, std::unique_ptr<DictionaryValue>()));
191 } 191 }
192 192
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 const std::string& extension_id, 893 const std::string& extension_id,
894 const GURL& listener_url, 894 const GURL& listener_url,
895 content::BrowserContext* browser_context) 895 content::BrowserContext* browser_context)
896 : event_name(event_name), 896 : event_name(event_name),
897 extension_id(extension_id), 897 extension_id(extension_id),
898 listener_url(listener_url), 898 listener_url(listener_url),
899 browser_context(browser_context) { 899 browser_context(browser_context) {
900 } 900 }
901 901
902 } // namespace extensions 902 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/web_request/web_request_api.cc ('k') | extensions/browser/extension_navigation_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698