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

Side by Side Diff: content/browser/devtools/protocol/tracing_handler.h

Issue 717083003: Report trace buffer usage as number of events, not only percentage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PROTOCOL_TRACING_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const double* buffer_usage_reporting_interval, 42 const double* buffer_usage_reporting_interval,
43 scoped_refptr<DevToolsProtocol::Command> command); 43 scoped_refptr<DevToolsProtocol::Command> command);
44 44
45 scoped_refptr<DevToolsProtocol::Response> End( 45 scoped_refptr<DevToolsProtocol::Response> End(
46 scoped_refptr<DevToolsProtocol::Command> command); 46 scoped_refptr<DevToolsProtocol::Command> command);
47 scoped_refptr<DevToolsProtocol::Response> GetCategories( 47 scoped_refptr<DevToolsProtocol::Response> GetCategories(
48 scoped_refptr<DevToolsProtocol::Command> command); 48 scoped_refptr<DevToolsProtocol::Command> command);
49 49
50 private: 50 private:
51 void OnRecordingEnabled(scoped_refptr<DevToolsProtocol::Command> command); 51 void OnRecordingEnabled(scoped_refptr<DevToolsProtocol::Command> command);
52 void OnBufferUsage(float usage); 52 void OnBufferUsage(float percent_full, size_t approximate_event_count);
53 53
54 void OnCategoriesReceived(scoped_refptr<DevToolsProtocol::Command> command, 54 void OnCategoriesReceived(scoped_refptr<DevToolsProtocol::Command> command,
55 const std::set<std::string>& category_set); 55 const std::set<std::string>& category_set);
56 56
57 base::debug::TraceOptions TraceOptionsFromString(const std::string* options); 57 base::debug::TraceOptions TraceOptionsFromString(const std::string* options);
58 58
59 void SetupTimer(double usage_reporting_interval); 59 void SetupTimer(double usage_reporting_interval);
60 60
61 void DisableRecording(bool abort); 61 void DisableRecording(bool abort);
62 62
63 scoped_ptr<base::Timer> buffer_usage_poll_timer_; 63 scoped_ptr<base::Timer> buffer_usage_poll_timer_;
64 Target target_; 64 Target target_;
65 bool is_recording_; 65 bool is_recording_;
66 66
67 scoped_ptr<Client> client_; 67 scoped_ptr<Client> client_;
68 base::WeakPtrFactory<TracingHandler> weak_factory_; 68 base::WeakPtrFactory<TracingHandler> weak_factory_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(TracingHandler); 70 DISALLOW_COPY_AND_ASSIGN(TracingHandler);
71 }; 71 };
72 72
73 } // namespace tracing 73 } // namespace tracing
74 } // namespace devtools 74 } // namespace devtools
75 } // namespace content 75 } // namespace content
76 76
77 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_ 77 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/browser_shutdown_profile_dumper.cc ('k') | content/browser/devtools/protocol/tracing_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698