| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extension_message_filter.h" | 5 #include "extensions/browser/extension_message_filter.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "components/crx_file/id_util.h" | 8 #include "components/crx_file/id_util.h" |
| 9 #include "components/keyed_service/content/browser_context_keyed_service_shutdow
n_notifier_factory.h" | 9 #include "components/keyed_service/content/browser_context_keyed_service_shutdow
n_notifier_factory.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 using content::RenderProcessHost; | 25 using content::RenderProcessHost; |
| 26 | 26 |
| 27 namespace extensions { | 27 namespace extensions { |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 class ShutdownNotifierFactory | 31 class ShutdownNotifierFactory |
| 32 : public BrowserContextKeyedServiceShutdownNotifierFactory { | 32 : public BrowserContextKeyedServiceShutdownNotifierFactory { |
| 33 public: | 33 public: |
| 34 static ShutdownNotifierFactory* GetInstance() { | 34 static ShutdownNotifierFactory* GetInstance() { |
| 35 return Singleton<ShutdownNotifierFactory>::get(); | 35 return base::Singleton<ShutdownNotifierFactory>::get(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 friend struct DefaultSingletonTraits<ShutdownNotifierFactory>; | 39 friend struct base::DefaultSingletonTraits<ShutdownNotifierFactory>; |
| 40 | 40 |
| 41 ShutdownNotifierFactory() | 41 ShutdownNotifierFactory() |
| 42 : BrowserContextKeyedServiceShutdownNotifierFactory( | 42 : BrowserContextKeyedServiceShutdownNotifierFactory( |
| 43 "ExtensionMessageFilter") { | 43 "ExtensionMessageFilter") { |
| 44 DependsOn(EventRouterFactory::GetInstance()); | 44 DependsOn(EventRouterFactory::GetInstance()); |
| 45 DependsOn(ProcessManagerFactory::GetInstance()); | 45 DependsOn(ProcessManagerFactory::GetInstance()); |
| 46 } | 46 } |
| 47 ~ShutdownNotifierFactory() override {} | 47 ~ShutdownNotifierFactory() override {} |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(ShutdownNotifierFactory); | 49 DISALLOW_COPY_AND_ASSIGN(ShutdownNotifierFactory); |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 // The extension has no background page, so there is nothing to wake. | 311 // The extension has no background page, so there is nothing to wake. |
| 312 SendWakeEventPageResponse(request_id, false); | 312 SendWakeEventPageResponse(request_id, false); |
| 313 } | 313 } |
| 314 | 314 |
| 315 void ExtensionMessageFilter::SendWakeEventPageResponse(int request_id, | 315 void ExtensionMessageFilter::SendWakeEventPageResponse(int request_id, |
| 316 bool success) { | 316 bool success) { |
| 317 Send(new ExtensionMsg_WakeEventPageResponse(request_id, success)); | 317 Send(new ExtensionMsg_WakeEventPageResponse(request_id, success)); |
| 318 } | 318 } |
| 319 | 319 |
| 320 } // namespace extensions | 320 } // namespace extensions |
| OLD | NEW |