| Index: extensions/browser/api/web_request/upload_data_presenter.cc
|
| diff --git a/extensions/browser/api/web_request/upload_data_presenter.cc b/extensions/browser/api/web_request/upload_data_presenter.cc
|
| index dbc6c9147432e21fa68b557e1ec214c7f3846c19..3bb1d8019d32e3a9af3e8be94df323a124cd9ac8 100644
|
| --- a/extensions/browser/api/web_request/upload_data_presenter.cc
|
| +++ b/extensions/browser/api/web_request/upload_data_presenter.cc
|
| @@ -7,6 +7,7 @@
|
| #include <utility>
|
|
|
| #include "base/files/file_path.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/values.h"
|
| #include "extensions/browser/api/web_request/form_data_parser.h"
|
| @@ -44,10 +45,10 @@ namespace extensions {
|
| namespace subtle {
|
|
|
| void AppendKeyValuePair(const char* key,
|
| - base::Value* value,
|
| + std::unique_ptr<base::Value> value,
|
| base::ListValue* list) {
|
| std::unique_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue);
|
| - dictionary->SetWithoutPathExpansion(key, value);
|
| + dictionary->SetWithoutPathExpansion(key, std::move(value));
|
| list->Append(std::move(dictionary));
|
| }
|
|
|
| @@ -97,7 +98,7 @@ void RawDataPresenter::FeedNextBytes(const char* bytes, size_t size) {
|
| void RawDataPresenter::FeedNextFile(const std::string& filename) {
|
| // Insert the file path instead of the contents, which may be too large.
|
| subtle::AppendKeyValuePair(keys::kRequestBodyRawFileKey,
|
| - new base::StringValue(filename),
|
| + base::MakeUnique<base::StringValue>(filename),
|
| list_.get());
|
| }
|
|
|
|
|