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

Unified Diff: content/browser/tracing/tracing_ui.cc

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 side-by-side diff with in-line comments
Download patch
Index: content/browser/tracing/tracing_ui.cc
diff --git a/content/browser/tracing/tracing_ui.cc b/content/browser/tracing/tracing_ui.cc
index 95e3ab92cdec6ce18a5c966dbbcfad86ce97e4e6..684f5663bdcaa465a78ee2c59b07d7e89853fc07 100644
--- a/content/browser/tracing/tracing_ui.cc
+++ b/content/browser/tracing/tracing_ui.cc
@@ -129,9 +129,10 @@ void OnRecordingEnabledAck(const WebUIDataSource::GotDataCallback& callback) {
callback.Run(res);
}
-void OnTraceBufferPercentFullResult(
- const WebUIDataSource::GotDataCallback& callback, float result) {
- std::string str = base::DoubleToString(result);
+void OnTraceBufferUsageResult(const WebUIDataSource::GotDataCallback& callback,
+ float percent_full,
+ size_t approximate_event_count) {
+ std::string str = base::DoubleToString(percent_full);
nduca 2014/11/14 18:11:17 here i notice you're not updating the tracing ui.
yurys 2014/11/17 09:10:01 I'm not updating devtools handler in this patch ei
callback.Run(base::RefCountedString::TakeString(&str));
}
@@ -205,8 +206,8 @@ bool OnBeginJSONRequest(const std::string& path,
return BeginRecording(data, callback);
}
if (path == "json/get_buffer_percent_full") {
- return TracingController::GetInstance()->GetTraceBufferPercentFull(
- base::Bind(OnTraceBufferPercentFullResult, callback));
+ return TracingController::GetInstance()->GetTraceBufferUsage(
+ base::Bind(OnTraceBufferUsageResult, callback));
}
if (path == "json/end_recording") {
return TracingController::GetInstance()->DisableRecording(

Powered by Google App Engine
This is Rietveld 408576698