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

Unified Diff: net/log/trace_net_log_observer.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « net/log/test_net_log_entry.cc ('k') | net/log/trace_net_log_observer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/trace_net_log_observer.cc
diff --git a/net/log/trace_net_log_observer.cc b/net/log/trace_net_log_observer.cc
index 4978e64c79e32ac7adb39bd736eebfa6d7cb137f..6a64e506644ea94a56e173b37f0f9fed31d4abdd 100644
--- a/net/log/trace_net_log_observer.cc
+++ b/net/log/trace_net_log_observer.cc
@@ -5,8 +5,8 @@
#include "net/log/trace_net_log_observer.h"
#include <stdio.h>
-
#include <string>
+#include <utility>
#include "base/json/json_writer.h"
#include "base/logging.h"
@@ -24,7 +24,8 @@ const char kNetLogTracingCategory[] = "netlog";
class TracedValue : public base::trace_event::ConvertableToTraceFormat {
public:
- explicit TracedValue(scoped_ptr<base::Value> value) : value_(value.Pass()) {}
+ explicit TracedValue(scoped_ptr<base::Value> value)
+ : value_(std::move(value)) {}
private:
~TracedValue() override {}
@@ -62,7 +63,7 @@ void TraceNetLogObserver::OnAddEntry(const NetLog::Entry& entry) {
entry.source().id, "source_type",
NetLog::SourceTypeToString(entry.source().type), "params",
scoped_refptr<base::trace_event::ConvertableToTraceFormat>(
- new TracedValue(params.Pass())));
+ new TracedValue(std::move(params))));
break;
case NetLog::PHASE_END:
TRACE_EVENT_NESTABLE_ASYNC_END2(
@@ -70,7 +71,7 @@ void TraceNetLogObserver::OnAddEntry(const NetLog::Entry& entry) {
entry.source().id, "source_type",
NetLog::SourceTypeToString(entry.source().type), "params",
scoped_refptr<base::trace_event::ConvertableToTraceFormat>(
- new TracedValue(params.Pass())));
+ new TracedValue(std::move(params))));
break;
case NetLog::PHASE_NONE:
TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(
@@ -78,7 +79,7 @@ void TraceNetLogObserver::OnAddEntry(const NetLog::Entry& entry) {
entry.source().id, "source_type",
NetLog::SourceTypeToString(entry.source().type), "params",
scoped_refptr<base::trace_event::ConvertableToTraceFormat>(
- new TracedValue(params.Pass())));
+ new TracedValue(std::move(params))));
break;
}
}
« no previous file with comments | « net/log/test_net_log_entry.cc ('k') | net/log/trace_net_log_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698