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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 months 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/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index f065df9dcc3ebd3398f73c2e3f4dd9d4e3bd5e0d..580c9b8129b16ff012696a55b18de8d0bd95d3e5 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -134,8 +134,9 @@ const int64_t kMaxTimeSinceIdleMs = 10;
class DevToolsChannelData : public base::trace_event::ConvertableToTraceFormat {
public:
- static scoped_refptr<base::trace_event::ConvertableToTraceFormat>
+ static scoped_ptr<base::trace_event::ConvertableToTraceFormat>
CreateForChannel(GpuChannel* channel);
+ ~DevToolsChannelData() override {}
void AppendAsTraceFormat(std::string* out) const override {
std::string tmp;
@@ -145,17 +146,16 @@ class DevToolsChannelData : public base::trace_event::ConvertableToTraceFormat {
private:
explicit DevToolsChannelData(base::Value* value) : value_(value) {}
- ~DevToolsChannelData() override {}
scoped_ptr<base::Value> value_;
DISALLOW_COPY_AND_ASSIGN(DevToolsChannelData);
};
-scoped_refptr<base::trace_event::ConvertableToTraceFormat>
+scoped_ptr<base::trace_event::ConvertableToTraceFormat>
DevToolsChannelData::CreateForChannel(GpuChannel* channel) {
scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue);
res->SetInteger("renderer_pid", channel->GetClientPID());
res->SetDouble("used_bytes", channel->GetMemoryUsage());
- return new DevToolsChannelData(res.release());
+ return make_scoped_ptr(new DevToolsChannelData(res.release()));
}
gpu::CommandBufferId GetCommandBufferID(int channel_id, int32_t route_id) {

Powered by Google App Engine
This is Rietveld 408576698