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

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

Issue 671783002: Reverting instrumentations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 (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 "base/profiler/scoped_profile.h"
11 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
12 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api_consta nts.h" 11 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api_consta nts.h"
13 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api_helper s.h" 12 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api_helper s.h"
14 #include "chrome/browser/extensions/extension_tab_util.h" 13 #include "chrome/browser/extensions/extension_tab_util.h"
15 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/tab_contents/retargeting_details.h" 15 #include "chrome/browser/tab_contents/retargeting_details.h"
17 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/browser_iterator.h" 17 #include "chrome/browser/ui/browser_iterator.h"
19 #include "chrome/browser/ui/browser_list.h" 18 #include "chrome/browser/ui/browser_list.h"
20 #include "chrome/common/extensions/api/web_navigation.h" 19 #include "chrome/common/extensions/api/web_navigation.h"
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 static base::LazyInstance<BrowserContextKeyedAPIFactory<WebNavigationAPI> > 764 static base::LazyInstance<BrowserContextKeyedAPIFactory<WebNavigationAPI> >
766 g_factory = LAZY_INSTANCE_INITIALIZER; 765 g_factory = LAZY_INSTANCE_INITIALIZER;
767 766
768 // static 767 // static
769 BrowserContextKeyedAPIFactory<WebNavigationAPI>* 768 BrowserContextKeyedAPIFactory<WebNavigationAPI>*
770 WebNavigationAPI::GetFactoryInstance() { 769 WebNavigationAPI::GetFactoryInstance() {
771 return g_factory.Pointer(); 770 return g_factory.Pointer();
772 } 771 }
773 772
774 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) { 773 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) {
775 // TODO(vadimt): Remove ScopedProfile below once crbug.com/417106 is fixed.
776 tracked_objects::ScopedProfile tracking_profile(
777 FROM_HERE_WITH_EXPLICIT_FUNCTION("WebNavigationAPI::OnListenerAdded"));
778
779 web_navigation_event_router_.reset(new WebNavigationEventRouter( 774 web_navigation_event_router_.reset(new WebNavigationEventRouter(
780 Profile::FromBrowserContext(browser_context_))); 775 Profile::FromBrowserContext(browser_context_)));
781 EventRouter::Get(browser_context_)->UnregisterObserver(this); 776 EventRouter::Get(browser_context_)->UnregisterObserver(this);
782 } 777 }
783 778
784 } // namespace extensions 779 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698