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

Unified Diff: content/browser/devtools/protocol/tracing_handler.cc

Issue 642263004: [DevTools] Make generated protocol structs wrappers around DictionaryValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix that will be needed for browser protocol 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/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(
« no previous file with comments | « content/browser/devtools/protocol/power_handler.cc ('k') | content/browser/devtools/protocol/usage_and_quota_query.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698