Index: content/browser/devtools/protocol/tracing_handler.cc |
diff --git a/content/browser/devtools/protocol/tracing_handler.cc b/content/browser/devtools/protocol/tracing_handler.cc |
index 7515da87b74ad6bb53326825950f4bc01784ea5d..6e9fa55aa48cce3a0f1cd6cb22c0a734675ee6cd 100644 |
--- a/content/browser/devtools/protocol/tracing_handler.cc |
+++ b/content/browser/devtools/protocol/tracing_handler.cc |
@@ -80,8 +80,7 @@ void TracingHandler::OnTraceDataCollected(const std::string& trace_fragment) { |
} |
void TracingHandler::OnTraceComplete() { |
- TracingCompleteParams params; |
- client_->TracingComplete(params); |
+ client_->TracingComplete(TracingCompleteParams::Create()); |
} |
scoped_refptr<DevToolsProtocol::Response> TracingHandler::Start( |
@@ -140,23 +139,21 @@ scoped_refptr<DevToolsProtocol::Response> TracingHandler::GetCategories( |
void TracingHandler::OnRecordingEnabled( |
scoped_refptr<DevToolsProtocol::Command> command) { |
- StartResponse response; |
- client_->SendStartResponse(command, response); |
+ client_->SendStartResponse(command, StartResponse::Create()); |
} |
void TracingHandler::OnBufferUsage(float usage) { |
- BufferUsageParams params; |
- params.set_value(usage); |
- client_->BufferUsage(params); |
+ client_->BufferUsage(BufferUsageParams::Create()->set_value(usage)); |
} |
void TracingHandler::OnCategoriesReceived( |
scoped_refptr<DevToolsProtocol::Command> command, |
const std::set<std::string>& category_set) { |
- std::vector<std::string> categories(category_set.begin(), category_set.end()); |
- GetCategoriesResponse response; |
- response.set_categories(categories); |
- client_->SendGetCategoriesResponse(command, response); |
+ std::vector<std::string> categories; |
+ for (const std::string& category : category_set) |
+ categories.push_back(category); |
+ client_->SendGetCategoriesResponse(command, |
+ GetCategoriesResponse::Create()->set_categories(categories)); |
} |
base::debug::TraceOptions TracingHandler::TraceOptionsFromString( |