Index: content/browser/devtools/protocol/power_handler.cc |
diff --git a/content/browser/devtools/protocol/power_handler.cc b/content/browser/devtools/protocol/power_handler.cc |
index c121ac3cf2d5d30d448777b7f3ec0a69b8d99937..06da81e5047500ab5bb737f086e3f752f014e791 100644 |
--- a/content/browser/devtools/protocol/power_handler.cc |
+++ b/content/browser/devtools/protocol/power_handler.cc |
@@ -25,21 +25,21 @@ void PowerHandler::SetClient(scoped_ptr<Client> client) { |
} |
void PowerHandler::OnPowerEvent(const PowerEventVector& events) { |
- std::vector<PowerEvent> event_list; |
+ scoped_ptr<ListBuilder<PowerEvent>> event_list; |
for (const auto& event : events) { |
- PowerEvent event_body; |
+ scoped_ptr<PowerEvent> event_body; |
DCHECK(event.type < content::PowerEvent::ID_COUNT); |
- event_body.set_type(kPowerTypeNames[event.type]); |
+ event_body->set_type(kPowerTypeNames[event.type]); |
// Use internal value to be consistent with Blink's |
// monotonicallyIncreasingTime. |
- event_body.set_timestamp(event.time.ToInternalValue() / |
+ event_body->set_timestamp(event.time.ToInternalValue() / |
static_cast<double>(base::Time::kMicrosecondsPerMillisecond)); |
- event_body.set_value(event.value); |
- event_list.push_back(event_body); |
+ event_body->set_value(event.value); |
+ event_list->push_back(event_body.Pass()); |
} |
- DataAvailableParams params; |
- params.set_value(event_list); |
- client_->DataAvailable(params); |
+ scoped_ptr<DataAvailableParams> params; |
+ params->set_value(event_list.Pass()); |
+ client_->DataAvailable(params.Pass()); |
} |
void PowerHandler::Detached() { |