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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 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
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
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
OLDNEW
« no previous file with comments | « extensions/browser/extension_function_registry.cc ('k') | extensions/browser/extension_pref_value_map_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698