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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/web_navigation_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 // Implements the Chrome Extensions WebNavigation API. 5 // Implements the Chrome Extensions WebNavigation API.
6 6
7 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 7 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 void WebNavigationAPI::Shutdown() { 826 void WebNavigationAPI::Shutdown() {
827 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 827 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
828 } 828 }
829 829
830 static base::LazyInstance<ProfileKeyedAPIFactory<WebNavigationAPI> > 830 static base::LazyInstance<ProfileKeyedAPIFactory<WebNavigationAPI> >
831 g_factory = LAZY_INSTANCE_INITIALIZER; 831 g_factory = LAZY_INSTANCE_INITIALIZER;
832 832
833 // static 833 // static
834 ProfileKeyedAPIFactory<WebNavigationAPI>* 834 ProfileKeyedAPIFactory<WebNavigationAPI>*
835 WebNavigationAPI::GetFactoryInstance() { 835 WebNavigationAPI::GetFactoryInstance() {
836 return &g_factory.Get(); 836 return g_factory.Pointer();
837 } 837 }
838 838
839 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) { 839 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) {
840 web_navigation_event_router_.reset(new WebNavigationEventRouter(profile_)); 840 web_navigation_event_router_.reset(new WebNavigationEventRouter(profile_));
841 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 841 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
842 } 842 }
843 843
844 #endif // OS_ANDROID 844 #endif // OS_ANDROID
845 845
846 } // namespace extensions 846 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698