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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_windows_api.cc

Issue 140613002: Cleanup: Replace &LazyInstance::Get() with LazyInstance::Pointer(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
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 "chrome/browser/extensions/api/tabs/tabs_windows_api.h" 5 #include "chrome/browser/extensions/api/tabs/tabs_windows_api.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "chrome/browser/extensions/api/tabs/tabs_event_router.h" 8 #include "chrome/browser/extensions/api/tabs/tabs_event_router.h"
9 #include "chrome/browser/extensions/api/tabs/windows_event_router.h" 9 #include "chrome/browser/extensions/api/tabs/windows_event_router.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 void TabsWindowsAPI::Shutdown() { 73 void TabsWindowsAPI::Shutdown() {
74 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 74 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
75 } 75 }
76 76
77 static base::LazyInstance<ProfileKeyedAPIFactory<TabsWindowsAPI> > 77 static base::LazyInstance<ProfileKeyedAPIFactory<TabsWindowsAPI> >
78 g_factory = LAZY_INSTANCE_INITIALIZER; 78 g_factory = LAZY_INSTANCE_INITIALIZER;
79 79
80 ProfileKeyedAPIFactory<TabsWindowsAPI>* TabsWindowsAPI::GetFactoryInstance() { 80 ProfileKeyedAPIFactory<TabsWindowsAPI>* TabsWindowsAPI::GetFactoryInstance() {
81 return &g_factory.Get(); 81 return g_factory.Pointer();
82 } 82 }
83 83
84 void TabsWindowsAPI::OnListenerAdded(const EventListenerInfo& details) { 84 void TabsWindowsAPI::OnListenerAdded(const EventListenerInfo& details) {
85 // Initialize the event routers. 85 // Initialize the event routers.
86 tabs_event_router(); 86 tabs_event_router();
87 windows_event_router(); 87 windows_event_router();
88 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 88 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
89 } 89 }
90 90
91 } // namespace extensions 91 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698