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

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

Issue 2842833003: Update SupportsUserData uses with unique_ptr. (Closed)
Patch Set: rebase Created 3 years, 7 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 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "content/public/browser/background_tracing_manager.h" 9 #include "content/public/browser/background_tracing_manager.h"
10 #include "content/public/browser/web_contents_observer.h" 10 #include "content/public/browser/web_contents_observer.h"
11 #include "content/public/browser/web_contents_user_data.h" 11 #include "content/public/browser/web_contents_user_data.h"
12 12
13 namespace tracing { 13 namespace tracing {
14 14
15 void SetupNavigationTracing(); 15 void SetupNavigationTracing();
16 16
17 class NavigationTracingObserver 17 class NavigationTracingObserver
18 : public content::WebContentsObserver, 18 : public content::WebContentsObserver,
19 public content::WebContentsUserData<NavigationTracingObserver> { 19 public content::WebContentsUserData<NavigationTracingObserver> {
20 public: 20 public:
21 ~NavigationTracingObserver() override;
22
21 static bool IsEnabled(); 23 static bool IsEnabled();
22 24
23 private: 25 private:
24 friend class content::WebContentsUserData<NavigationTracingObserver>; 26 friend class content::WebContentsUserData<NavigationTracingObserver>;
25 27
26 explicit NavigationTracingObserver(content::WebContents* web_contents); 28 explicit NavigationTracingObserver(content::WebContents* web_contents);
27 29
28 ~NavigationTracingObserver() override;
29
30 // content::WebContentsObserver implementation. 30 // content::WebContentsObserver implementation.
31 void DidStartNavigation( 31 void DidStartNavigation(
32 content::NavigationHandle* navigation_handle) override; 32 content::NavigationHandle* navigation_handle) override;
33 33
34 static content::BackgroundTracingManager::TriggerHandle 34 static content::BackgroundTracingManager::TriggerHandle
35 navigation_trigger_handle_; 35 navigation_trigger_handle_;
36 36
37 DISALLOW_COPY_AND_ASSIGN(NavigationTracingObserver); 37 DISALLOW_COPY_AND_ASSIGN(NavigationTracingObserver);
38 }; 38 };
39 39
40 } // namespace tracing 40 } // namespace tracing
41 41
42 #endif // CHROME_BROWSER_TRACING_NAVIGATION_TRACING_H_ 42 #endif // CHROME_BROWSER_TRACING_NAVIGATION_TRACING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698