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

Side by Side Diff: content/browser/devtools/devtools_tracing_handler.h

Issue 425593002: Refactor trace_event_impl's SetEnabled to use TraceOptions. Propagate this through the whole stack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address joechan's comments Created 6 years, 4 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 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/debug/trace_event.h"
11 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
12 #include "content/browser/devtools/devtools_protocol.h" 13 #include "content/browser/devtools/devtools_protocol.h"
13 #include "content/public/browser/tracing_controller.h" 14 #include "content/public/browser/tracing_controller.h"
14 15
15 namespace base { 16 namespace base {
16 class RefCountedString; 17 class RefCountedString;
17 class Timer; 18 class Timer;
18 } 19 }
19 20
20 namespace content { 21 namespace content {
(...skipping 25 matching lines...) Expand all
46 47
47 void OnTracingStarted( 48 void OnTracingStarted(
48 scoped_refptr<DevToolsProtocol::Notification> notification); 49 scoped_refptr<DevToolsProtocol::Notification> notification);
49 50
50 void OnTracingStopped( 51 void OnTracingStopped(
51 scoped_refptr<DevToolsProtocol::Notification> notification); 52 scoped_refptr<DevToolsProtocol::Notification> notification);
52 53
53 void OnCategoriesReceived(scoped_refptr<DevToolsProtocol::Command> command, 54 void OnCategoriesReceived(scoped_refptr<DevToolsProtocol::Command> command,
54 const std::set<std::string>& category_set); 55 const std::set<std::string>& category_set);
55 56
56 TracingController::Options TraceOptionsFromString(const std::string& options); 57 base::debug::TraceOptions TraceOptionsFromString(const std::string& options);
57 58
58 void SetupTimer(double usage_reporting_interval); 59 void SetupTimer(double usage_reporting_interval);
59 60
60 void DisableRecording( 61 void DisableRecording(
61 const TracingController::TracingFileResultCallback& callback = 62 const TracingController::TracingFileResultCallback& callback =
62 TracingController::TracingFileResultCallback()); 63 TracingController::TracingFileResultCallback());
63 64
64 base::WeakPtrFactory<DevToolsTracingHandler> weak_factory_; 65 base::WeakPtrFactory<DevToolsTracingHandler> weak_factory_;
65 scoped_ptr<base::Timer> buffer_usage_poll_timer_; 66 scoped_ptr<base::Timer> buffer_usage_poll_timer_;
66 Target target_; 67 Target target_;
67 bool is_recording_; 68 bool is_recording_;
68 69
69 static const char* kDefaultCategories; 70 static const char* kDefaultCategories;
70 static const double kDefaultReportingInterval; 71 static const double kDefaultReportingInterval;
71 static const double kMinimumReportingInterval; 72 static const double kMinimumReportingInterval;
72 73
73 DISALLOW_COPY_AND_ASSIGN(DevToolsTracingHandler); 74 DISALLOW_COPY_AND_ASSIGN(DevToolsTracingHandler);
74 }; 75 };
75 76
76 } // namespace content 77 } // namespace content
77 78
78 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_ 79 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/android/tracing_controller_android.cc ('k') | content/browser/devtools/devtools_tracing_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698