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 11 matching lines...) Expand all Loading... |
22 using content::RenderProcessHost; | 22 using content::RenderProcessHost; |
23 | 23 |
24 namespace extensions { | 24 namespace extensions { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 class ShutdownNotifierFactory | 28 class ShutdownNotifierFactory |
29 : public BrowserContextKeyedServiceShutdownNotifierFactory { | 29 : public BrowserContextKeyedServiceShutdownNotifierFactory { |
30 public: | 30 public: |
31 static ShutdownNotifierFactory* GetInstance() { | 31 static ShutdownNotifierFactory* GetInstance() { |
32 return Singleton<ShutdownNotifierFactory>::get(); | 32 return base::Singleton<ShutdownNotifierFactory>::get(); |
33 } | 33 } |
34 | 34 |
35 private: | 35 private: |
36 friend struct DefaultSingletonTraits<ShutdownNotifierFactory>; | 36 friend struct base::DefaultSingletonTraits<ShutdownNotifierFactory>; |
37 | 37 |
38 ShutdownNotifierFactory() | 38 ShutdownNotifierFactory() |
39 : BrowserContextKeyedServiceShutdownNotifierFactory( | 39 : BrowserContextKeyedServiceShutdownNotifierFactory( |
40 "ExtensionMessageFilter") { | 40 "ExtensionMessageFilter") { |
41 DependsOn(EventRouterFactory::GetInstance()); | 41 DependsOn(EventRouterFactory::GetInstance()); |
42 DependsOn(ProcessManagerFactory::GetInstance()); | 42 DependsOn(ProcessManagerFactory::GetInstance()); |
43 } | 43 } |
44 ~ShutdownNotifierFactory() override {} | 44 ~ShutdownNotifierFactory() override {} |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(ShutdownNotifierFactory); | 46 DISALLOW_COPY_AND_ASSIGN(ShutdownNotifierFactory); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 void ExtensionMessageFilter::OnExtensionTransferBlobsAck( | 232 void ExtensionMessageFilter::OnExtensionTransferBlobsAck( |
233 const std::vector<std::string>& blob_uuids) { | 233 const std::vector<std::string>& blob_uuids) { |
234 RenderProcessHost* process = RenderProcessHost::FromID(render_process_id_); | 234 RenderProcessHost* process = RenderProcessHost::FromID(render_process_id_); |
235 if (!process) | 235 if (!process) |
236 return; | 236 return; |
237 | 237 |
238 BlobHolder::FromRenderProcessHost(process)->DropBlobs(blob_uuids); | 238 BlobHolder::FromRenderProcessHost(process)->DropBlobs(blob_uuids); |
239 } | 239 } |
240 | 240 |
241 } // namespace extensions | 241 } // namespace extensions |
OLD | NEW |