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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc

Issue 178193030: Rename ProfileKeyedAPI to BrowserContextKeyedAPI and GetProfile to Get. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 9 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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 } 822 }
823 823
824 WebNavigationAPI::~WebNavigationAPI() { 824 WebNavigationAPI::~WebNavigationAPI() {
825 } 825 }
826 826
827 void WebNavigationAPI::Shutdown() { 827 void WebNavigationAPI::Shutdown() {
828 ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver( 828 ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver(
829 this); 829 this);
830 } 830 }
831 831
832 static base::LazyInstance<ProfileKeyedAPIFactory<WebNavigationAPI> > 832 static base::LazyInstance<BrowserContextKeyedAPIFactory<WebNavigationAPI> >
833 g_factory = LAZY_INSTANCE_INITIALIZER; 833 g_factory = LAZY_INSTANCE_INITIALIZER;
834 834
835 // static 835 // static
836 ProfileKeyedAPIFactory<WebNavigationAPI>* 836 BrowserContextKeyedAPIFactory<WebNavigationAPI>*
837 WebNavigationAPI::GetFactoryInstance() { 837 WebNavigationAPI::GetFactoryInstance() {
838 return g_factory.Pointer(); 838 return g_factory.Pointer();
839 } 839 }
840 840
841 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) { 841 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) {
842 web_navigation_event_router_.reset(new WebNavigationEventRouter( 842 web_navigation_event_router_.reset(new WebNavigationEventRouter(
843 Profile::FromBrowserContext(browser_context_))); 843 Profile::FromBrowserContext(browser_context_)));
844 ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver( 844 ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver(
845 this); 845 this);
846 } 846 }
847 847
848 #endif // OS_ANDROID 848 #endif // OS_ANDROID
849 849
850 } // namespace extensions 850 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698