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

Side by Side Diff: chrome/browser/extensions/api/sessions/sessions_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sessions/sessions_api.h" 5 #include "chrome/browser/extensions/api/sessions/sessions_api.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
12 #include "base/profiler/scoped_profile.h"
13 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
15 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
16 #include "base/time/time.h" 15 #include "base/time/time.h"
17 #include "chrome/browser/extensions/api/sessions/session_id.h" 16 #include "chrome/browser/extensions/api/sessions/session_id.h"
18 #include "chrome/browser/extensions/api/tabs/windows_util.h" 17 #include "chrome/browser/extensions/api/tabs/windows_util.h"
19 #include "chrome/browser/extensions/extension_tab_util.h" 18 #include "chrome/browser/extensions/extension_tab_util.h"
20 #include "chrome/browser/extensions/window_controller.h" 19 #include "chrome/browser/extensions/window_controller.h"
21 #include "chrome/browser/extensions/window_controller_list.h" 20 #include "chrome/browser/extensions/window_controller_list.h"
22 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 637
639 static base::LazyInstance<BrowserContextKeyedAPIFactory<SessionsAPI> > 638 static base::LazyInstance<BrowserContextKeyedAPIFactory<SessionsAPI> >
640 g_factory = LAZY_INSTANCE_INITIALIZER; 639 g_factory = LAZY_INSTANCE_INITIALIZER;
641 640
642 BrowserContextKeyedAPIFactory<SessionsAPI>* 641 BrowserContextKeyedAPIFactory<SessionsAPI>*
643 SessionsAPI::GetFactoryInstance() { 642 SessionsAPI::GetFactoryInstance() {
644 return g_factory.Pointer(); 643 return g_factory.Pointer();
645 } 644 }
646 645
647 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) { 646 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) {
648 // TODO(vadimt): Remove ScopedProfile below once crbug.com/417106 is fixed.
649 tracked_objects::ScopedProfile tracking_profile(
650 FROM_HERE_WITH_EXPLICIT_FUNCTION("SessionsAPI::OnListenerAdded"));
651
652 sessions_event_router_.reset( 647 sessions_event_router_.reset(
653 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_))); 648 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_)));
654 EventRouter::Get(browser_context_)->UnregisterObserver(this); 649 EventRouter::Get(browser_context_)->UnregisterObserver(this);
655 } 650 }
656 651
657 } // namespace extensions 652 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698