| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/sockets_udp/udp_socket_event_dispatcher.
h" | 5 #include "chrome/browser/extensions/api/sockets_udp/udp_socket_event_dispatcher.
h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/extensions/api/socket/udp_socket.h" | 8 #include "chrome/browser/extensions/api/socket/udp_socket.h" |
| 9 #include "chrome/browser/extensions/extension_system.h" | |
| 10 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/profiles/profile_manager.h" | 10 #include "chrome/browser/profiles/profile_manager.h" |
| 12 #include "extensions/browser/event_router.h" | 11 #include "extensions/browser/event_router.h" |
| 12 #include "extensions/browser/extension_system.h" |
| 13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
| 14 | 14 |
| 15 namespace extensions { | 15 namespace extensions { |
| 16 namespace api { | 16 namespace api { |
| 17 | 17 |
| 18 using content::BrowserThread; | 18 using content::BrowserThread; |
| 19 | 19 |
| 20 static base::LazyInstance<ProfileKeyedAPIFactory<UDPSocketEventDispatcher> > | 20 static base::LazyInstance<ProfileKeyedAPIFactory<UDPSocketEventDispatcher> > |
| 21 g_factory = LAZY_INSTANCE_INITIALIZER; | 21 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 22 | 22 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 if (!g_browser_process->profile_manager()->IsValidProfile(profile)) | 173 if (!g_browser_process->profile_manager()->IsValidProfile(profile)) |
| 174 return; | 174 return; |
| 175 | 175 |
| 176 EventRouter* router = ExtensionSystem::Get(profile)->event_router(); | 176 EventRouter* router = ExtensionSystem::Get(profile)->event_router(); |
| 177 if (router) | 177 if (router) |
| 178 router->DispatchEventToExtension(extension_id, event.Pass()); | 178 router->DispatchEventToExtension(extension_id, event.Pass()); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace api | 181 } // namespace api |
| 182 } // namespace extensions | 182 } // namespace extensions |
| OLD | NEW |