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

Side by Side Diff: chrome/browser/tracing/navigation_tracing.h

Issue 1426803004: Made the NavigationTracingObserver always be active whenever background tracing is active (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@random_triggers
Patch Set: Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_TRACING_NAVIGATION_TRACING_H_ 5 #ifndef CHROME_BROWSER_TRACING_NAVIGATION_TRACING_H_
6 #define CHROME_BROWSER_TRACING_NAVIGATION_TRACING_H_ 6 #define CHROME_BROWSER_TRACING_NAVIGATION_TRACING_H_
7 7
8 #include "content/public/browser/background_tracing_manager.h" 8 #include "content/public/browser/background_tracing_manager.h"
9 #include "content/public/browser/web_contents_observer.h" 9 #include "content/public/browser/web_contents_observer.h"
10 #include "content/public/browser/web_contents_user_data.h" 10 #include "content/public/browser/web_contents_user_data.h"
11 11
12 namespace tracing { 12 namespace tracing {
13 13
14 void SetupNavigationTracing(); 14 void SetupNavigationTracing();
15 15
16 class NavigationTracingObserver 16 class NavigationTracingObserver
17 : public content::WebContentsObserver, 17 : public content::WebContentsObserver,
18 public content::WebContentsUserData<NavigationTracingObserver> { 18 public content::WebContentsUserData<NavigationTracingObserver> {
19 public:
20 static bool IsEnabled();
21
19 private: 22 private:
20 friend class content::WebContentsUserData<NavigationTracingObserver>; 23 friend class content::WebContentsUserData<NavigationTracingObserver>;
21 24
22 explicit NavigationTracingObserver(content::WebContents* web_contents); 25 explicit NavigationTracingObserver(content::WebContents* web_contents);
23 26
24 ~NavigationTracingObserver() override; 27 ~NavigationTracingObserver() override;
25 28
26 // content::WebContentsObserver implementation. 29 // content::WebContentsObserver implementation.
27 void DidStartProvisionalLoadForFrame( 30 void DidStartProvisionalLoadForFrame(
28 content::RenderFrameHost* render_frame_host, 31 content::RenderFrameHost* render_frame_host,
29 const GURL& validated_url, 32 const GURL& validated_url,
30 bool is_error_page, 33 bool is_error_page,
31 bool is_iframe_srcdoc) override; 34 bool is_iframe_srcdoc) override;
32 35
33 static content::BackgroundTracingManager::TriggerHandle navigation_handle; 36 static content::BackgroundTracingManager::TriggerHandle navigation_handle;
34 37
35 DISALLOW_COPY_AND_ASSIGN(NavigationTracingObserver); 38 DISALLOW_COPY_AND_ASSIGN(NavigationTracingObserver);
36 }; 39 };
37 40
38 } // namespace tracing 41 } // namespace tracing
39 42
40 #endif // CHROME_BROWSER_TRACING_NAVIGATION_TRACING_H_ 43 #endif // CHROME_BROWSER_TRACING_NAVIGATION_TRACING_H_
OLDNEW
« no previous file with comments | « chrome/browser/tracing/chrome_tracing_delegate_browsertest.cc ('k') | chrome/browser/tracing/navigation_tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698