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

Unified Diff: net/log/net_log.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/http/url_security_manager_unittest.cc ('k') | net/log/net_log_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/net_log.cc
diff --git a/net/log/net_log.cc b/net/log/net_log.cc
index 4fae9e08493c9b0682757f51f77d667f96ed170d..90ec6a0ea34e9720c2b207ce4a3d69a6e53f6db1 100644
--- a/net/log/net_log.cc
+++ b/net/log/net_log.cc
@@ -4,6 +4,8 @@
#include "net/log/net_log.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/debug/alias.h"
#include "base/logging.h"
@@ -29,7 +31,7 @@ scoped_ptr<base::Value> BytesTransferredCallback(
dict->SetInteger("byte_count", byte_count);
if (capture_mode.include_socket_bytes() && byte_count > 0)
dict->SetString("hex_encoded_bytes", base::HexEncode(bytes, byte_count));
- return dict.Pass();
+ return std::move(dict);
}
scoped_ptr<base::Value> SourceEventParametersCallback(
@@ -39,7 +41,7 @@ scoped_ptr<base::Value> SourceEventParametersCallback(
return scoped_ptr<base::Value>();
scoped_ptr<base::DictionaryValue> event_params(new base::DictionaryValue());
source.AddToEventParameters(event_params.get());
- return event_params.Pass();
+ return std::move(event_params);
}
scoped_ptr<base::Value> NetLogBoolCallback(
@@ -48,7 +50,7 @@ scoped_ptr<base::Value> NetLogBoolCallback(
NetLogCaptureMode /* capture_mode */) {
scoped_ptr<base::DictionaryValue> event_params(new base::DictionaryValue());
event_params->SetBoolean(name, value);
- return event_params.Pass();
+ return std::move(event_params);
}
scoped_ptr<base::Value> NetLogIntCallback(
@@ -57,7 +59,7 @@ scoped_ptr<base::Value> NetLogIntCallback(
NetLogCaptureMode /* capture_mode */) {
scoped_ptr<base::DictionaryValue> event_params(new base::DictionaryValue());
event_params->SetInteger(name, value);
- return event_params.Pass();
+ return std::move(event_params);
}
scoped_ptr<base::Value> NetLogInt64Callback(
@@ -66,7 +68,7 @@ scoped_ptr<base::Value> NetLogInt64Callback(
NetLogCaptureMode /* capture_mode */) {
scoped_ptr<base::DictionaryValue> event_params(new base::DictionaryValue());
event_params->SetString(name, base::Int64ToString(value));
- return event_params.Pass();
+ return std::move(event_params);
}
scoped_ptr<base::Value> NetLogStringCallback(
@@ -75,7 +77,7 @@ scoped_ptr<base::Value> NetLogStringCallback(
NetLogCaptureMode /* capture_mode */) {
scoped_ptr<base::DictionaryValue> event_params(new base::DictionaryValue());
event_params->SetString(name, *value);
- return event_params.Pass();
+ return std::move(event_params);
}
scoped_ptr<base::Value> NetLogString16Callback(
@@ -84,7 +86,7 @@ scoped_ptr<base::Value> NetLogString16Callback(
NetLogCaptureMode /* capture_mode */) {
scoped_ptr<base::DictionaryValue> event_params(new base::DictionaryValue());
event_params->SetString(name, *value);
- return event_params.Pass();
+ return std::move(event_params);
}
} // namespace
@@ -106,7 +108,7 @@ void NetLog::Source::AddToEventParameters(
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetInteger("type", static_cast<int>(type));
dict->SetInteger("id", static_cast<int>(id));
- event_params->Set("source_dependency", dict.Pass());
+ event_params->Set("source_dependency", std::move(dict));
}
NetLog::ParametersCallback NetLog::Source::ToEventParametersCallback() const {
@@ -143,7 +145,7 @@ base::Value* NetLog::Entry::ToValue() const {
scoped_ptr<base::DictionaryValue> source_dict(new base::DictionaryValue());
source_dict->SetInteger("id", data_->source.id);
source_dict->SetInteger("type", static_cast<int>(data_->source.type));
- entry_dict->Set("source", source_dict.Pass());
+ entry_dict->Set("source", std::move(source_dict));
// Set the event info.
entry_dict->SetInteger("type", static_cast<int>(data_->type));
@@ -154,7 +156,7 @@ base::Value* NetLog::Entry::ToValue() const {
scoped_ptr<base::Value> value(
data_->parameters_callback->Run(capture_mode_));
if (value)
- entry_dict->Set("params", value.Pass());
+ entry_dict->Set("params", std::move(value));
}
return entry_dict.release();
« no previous file with comments | « net/http/url_security_manager_unittest.cc ('k') | net/log/net_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698