Remove raw base::DictionaryValue::Set

https://codereview.chromium.org/2911033002
This commit is contained in:
Aleksei Kuzmin 2017-08-12 20:27:48 +03:00 committed by Cheng Zhao
parent cf00fc0661
commit 2c063f93ff
5 changed files with 20 additions and 12 deletions

View file

@ -9,6 +9,7 @@
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram.h"
#include "base/strings/pattern.h"
#include "base/strings/stringprintf.h"
@ -758,10 +759,10 @@ void InspectableWebContentsImpl::OnURLFetchComplete(
DCHECK(it != pending_requests_.end());
base::DictionaryValue response;
auto* headers = new base::DictionaryValue();
auto headers = base::MakeUnique<base::DictionaryValue>();
net::HttpResponseHeaders* rh = source->GetResponseHeaders();
response.SetInteger("statusCode", rh ? rh->response_code() : 200);
response.Set("headers", headers);
response.Set("headers", std::move(headers));
size_t iterator = 0;
std::string name;