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

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 Nat and Dan's comments. Use CategoryFilter for tracing_controller.h's APIs 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 18 matching lines...) Expand all
39 scoped_refptr<DevToolsProtocol::Response> OnStart( 40 scoped_refptr<DevToolsProtocol::Response> OnStart(
40 scoped_refptr<DevToolsProtocol::Command> command); 41 scoped_refptr<DevToolsProtocol::Command> command);
41 scoped_refptr<DevToolsProtocol::Response> OnEnd( 42 scoped_refptr<DevToolsProtocol::Response> OnEnd(
42 scoped_refptr<DevToolsProtocol::Command> command); 43 scoped_refptr<DevToolsProtocol::Command> command);
43 44
44 scoped_refptr<DevToolsProtocol::Response> OnGetCategories( 45 scoped_refptr<DevToolsProtocol::Response> OnGetCategories(
45 scoped_refptr<DevToolsProtocol::Command> command); 46 scoped_refptr<DevToolsProtocol::Command> command);
46 void OnCategoriesReceived(scoped_refptr<DevToolsProtocol::Command> command, 47 void OnCategoriesReceived(scoped_refptr<DevToolsProtocol::Command> command,
47 const std::set<std::string>& category_set); 48 const std::set<std::string>& category_set);
48 49
49 TracingController::Options TraceOptionsFromString(const std::string& options); 50 base::debug::TraceOptions TraceOptionsFromString(const std::string& options);
50 51
51 void DisableRecording( 52 void DisableRecording(
52 const TracingController::TracingFileResultCallback& callback = 53 const TracingController::TracingFileResultCallback& callback =
53 TracingController::TracingFileResultCallback()); 54 TracingController::TracingFileResultCallback());
54 55
55 base::WeakPtrFactory<DevToolsTracingHandler> weak_factory_; 56 base::WeakPtrFactory<DevToolsTracingHandler> weak_factory_;
56 scoped_ptr<base::Timer> buffer_usage_poll_timer_; 57 scoped_ptr<base::Timer> buffer_usage_poll_timer_;
57 Target target_; 58 Target target_;
58 bool is_recording_; 59 bool is_recording_;
59 DISALLOW_COPY_AND_ASSIGN(DevToolsTracingHandler); 60 DISALLOW_COPY_AND_ASSIGN(DevToolsTracingHandler);
60 }; 61 };
61 62
62 } // namespace content 63 } // namespace content
63 64
64 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_ 65 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_TRACING_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698