diff options
Diffstat (limited to 'content/browser/download/download_net_log_parameters.cc')
-rw-r--r-- | content/browser/download/download_net_log_parameters.cc | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/content/browser/download/download_net_log_parameters.cc b/content/browser/download/download_net_log_parameters.cc index ea920af..e81c813 100644 --- a/content/browser/download/download_net_log_parameters.cc +++ b/content/browser/download/download_net_log_parameters.cc @@ -4,6 +4,8 @@ #include "content/browser/download/download_net_log_parameters.h" +#include <utility> + #include "base/files/file_path.h" #include "base/logging.h" #include "base/macros.h" @@ -59,7 +61,7 @@ scoped_ptr<base::Value> ItemActivatedNetLogCallback( base::Int64ToString(download_item->GetReceivedBytes())); dict->SetBoolean("has_user_gesture", download_item->HasUserGesture()); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> ItemCheckedNetLogCallback( @@ -69,7 +71,7 @@ scoped_ptr<base::Value> ItemCheckedNetLogCallback( dict->SetString("danger_type", download_danger_names[danger_type]); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> ItemRenamedNetLogCallback( @@ -81,7 +83,7 @@ scoped_ptr<base::Value> ItemRenamedNetLogCallback( dict->SetString("old_filename", old_filename->AsUTF8Unsafe()); dict->SetString("new_filename", new_filename->AsUTF8Unsafe()); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> ItemInterruptedNetLogCallback( @@ -96,7 +98,7 @@ scoped_ptr<base::Value> ItemInterruptedNetLogCallback( dict->SetString("hash_state", base::HexEncode(hash_state->data(), hash_state->size())); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> ItemResumingNetLogCallback( @@ -113,7 +115,7 @@ scoped_ptr<base::Value> ItemResumingNetLogCallback( dict->SetString("hash_state", base::HexEncode(hash_state->data(), hash_state->size())); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> ItemCompletingNetLogCallback( @@ -126,7 +128,7 @@ scoped_ptr<base::Value> ItemCompletingNetLogCallback( dict->SetString("final_hash", base::HexEncode(final_hash->data(), final_hash->size())); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> ItemFinishedNetLogCallback( @@ -136,7 +138,7 @@ scoped_ptr<base::Value> ItemFinishedNetLogCallback( dict->SetString("auto_opened", auto_opened ? "yes" : "no"); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> ItemCanceledNetLogCallback( @@ -149,7 +151,7 @@ scoped_ptr<base::Value> ItemCanceledNetLogCallback( dict->SetString("hash_state", base::HexEncode(hash_state->data(), hash_state->size())); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> FileOpenedNetLogCallback( @@ -161,7 +163,7 @@ scoped_ptr<base::Value> FileOpenedNetLogCallback( dict->SetString("file_name", file_name->AsUTF8Unsafe()); dict->SetString("start_offset", base::Int64ToString(start_offset)); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> FileStreamDrainedNetLogCallback( @@ -173,7 +175,7 @@ scoped_ptr<base::Value> FileStreamDrainedNetLogCallback( dict->SetInteger("stream_size", static_cast<int>(stream_size)); dict->SetInteger("num_buffers", static_cast<int>(num_buffers)); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> FileRenamedNetLogCallback( @@ -185,7 +187,7 @@ scoped_ptr<base::Value> FileRenamedNetLogCallback( dict->SetString("old_filename", old_filename->AsUTF8Unsafe()); dict->SetString("new_filename", new_filename->AsUTF8Unsafe()); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> FileErrorNetLogCallback( @@ -197,7 +199,7 @@ scoped_ptr<base::Value> FileErrorNetLogCallback( dict->SetString("operation", operation); dict->SetInteger("net_error", net_error); - return dict.Pass(); + return std::move(dict); } scoped_ptr<base::Value> FileInterruptedNetLogCallback( @@ -212,7 +214,7 @@ scoped_ptr<base::Value> FileInterruptedNetLogCallback( dict->SetInteger("os_error", os_error); dict->SetString("interrupt_reason", DownloadInterruptReasonToString(reason)); - return dict.Pass(); + return std::move(dict); } } // namespace content |