| Index: content/browser/appcache/appcache_internals_ui.cc
|
| diff --git a/content/browser/appcache/appcache_internals_ui.cc b/content/browser/appcache/appcache_internals_ui.cc
|
| index 0c402129b60e4b2a35bcec7ea67ff7a2e1f15b2c..1a36ddbcb6a8c39c3adda410c09f0be710317cf2 100644
|
| --- a/content/browser/appcache/appcache_internals_ui.cc
|
| +++ b/content/browser/appcache/appcache_internals_ui.cc
|
| @@ -55,10 +55,11 @@ bool SortByResourceUrl(const AppCacheResourceInfo& lhs,
|
| return lhs.url.spec() < rhs.url.spec();
|
| }
|
|
|
| -scoped_ptr<base::DictionaryValue> GetDictionaryValueForResponseEnquiry(
|
| +std::unique_ptr<base::DictionaryValue> GetDictionaryValueForResponseEnquiry(
|
| const content::AppCacheInternalsUI::Proxy::ResponseEnquiry&
|
| response_enquiry) {
|
| - scoped_ptr<base::DictionaryValue> dict_value(new base::DictionaryValue());
|
| + std::unique_ptr<base::DictionaryValue> dict_value(
|
| + new base::DictionaryValue());
|
| dict_value->SetString("manifestURL", response_enquiry.manifest_url);
|
| dict_value->SetString("groupId",
|
| base::Int64ToString(response_enquiry.group_id));
|
| @@ -67,9 +68,10 @@ scoped_ptr<base::DictionaryValue> GetDictionaryValueForResponseEnquiry(
|
| return dict_value;
|
| }
|
|
|
| -scoped_ptr<base::DictionaryValue> GetDictionaryValueForAppCacheInfo(
|
| +std::unique_ptr<base::DictionaryValue> GetDictionaryValueForAppCacheInfo(
|
| const content::AppCacheInfo& appcache_info) {
|
| - scoped_ptr<base::DictionaryValue> dict_value(new base::DictionaryValue());
|
| + std::unique_ptr<base::DictionaryValue> dict_value(
|
| + new base::DictionaryValue());
|
| dict_value->SetString("manifestURL", appcache_info.manifest_url.spec());
|
| dict_value->SetDouble("creationTime", appcache_info.creation_time.ToJsTime());
|
| dict_value->SetDouble("lastUpdateTime",
|
| @@ -84,29 +86,30 @@ scoped_ptr<base::DictionaryValue> GetDictionaryValueForAppCacheInfo(
|
| return dict_value;
|
| }
|
|
|
| -scoped_ptr<base::ListValue> GetListValueForAppCacheInfoVector(
|
| +std::unique_ptr<base::ListValue> GetListValueForAppCacheInfoVector(
|
| const AppCacheInfoVector& appcache_info_vector) {
|
| - scoped_ptr<base::ListValue> list(new base::ListValue());
|
| + std::unique_ptr<base::ListValue> list(new base::ListValue());
|
| for (const AppCacheInfo& info : appcache_info_vector)
|
| list->Append(GetDictionaryValueForAppCacheInfo(info));
|
| return list;
|
| }
|
|
|
| -scoped_ptr<base::ListValue> GetListValueFromAppCacheInfoCollection(
|
| +std::unique_ptr<base::ListValue> GetListValueFromAppCacheInfoCollection(
|
| AppCacheInfoCollection* appcache_collection) {
|
| - scoped_ptr<base::ListValue> list(new base::ListValue());
|
| + std::unique_ptr<base::ListValue> list(new base::ListValue());
|
| for (const auto& key_value : appcache_collection->infos_by_origin) {
|
| base::DictionaryValue* dict = new base::DictionaryValue;
|
| dict->SetString("originURL", key_value.first.spec());
|
| dict->Set("manifests", GetListValueForAppCacheInfoVector(key_value.second));
|
| - list->Append(scoped_ptr<base::Value>(dict));
|
| + list->Append(std::unique_ptr<base::Value>(dict));
|
| }
|
| return list;
|
| }
|
|
|
| -scoped_ptr<base::DictionaryValue> GetDictionaryValueForAppCacheResourceInfo(
|
| +std::unique_ptr<base::DictionaryValue>
|
| +GetDictionaryValueForAppCacheResourceInfo(
|
| const AppCacheResourceInfo& resource_info) {
|
| - scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
|
| + std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
|
| dict->SetString("url", resource_info.url.spec());
|
| dict->SetString(
|
| "size",
|
| @@ -122,9 +125,9 @@ scoped_ptr<base::DictionaryValue> GetDictionaryValueForAppCacheResourceInfo(
|
| return dict;
|
| }
|
|
|
| -scoped_ptr<base::ListValue> GetListValueForAppCacheResourceInfoVector(
|
| +std::unique_ptr<base::ListValue> GetListValueForAppCacheResourceInfoVector(
|
| AppCacheResourceInfoVector* resource_info_vector) {
|
| - scoped_ptr<base::ListValue> list(new base::ListValue);
|
| + std::unique_ptr<base::ListValue> list(new base::ListValue);
|
| for (const AppCacheResourceInfo& res_info : *resource_info_vector)
|
| list->Append(GetDictionaryValueForAppCacheResourceInfo(res_info));
|
| return list;
|
| @@ -233,7 +236,7 @@ void AppCacheInternalsUI::Proxy::RequestAppCacheDetails(
|
|
|
| void AppCacheInternalsUI::Proxy::OnGroupLoaded(AppCacheGroup* appcache_group,
|
| const GURL& manifest_gurl) {
|
| - scoped_ptr<AppCacheResourceInfoVector> resource_info_vector;
|
| + std::unique_ptr<AppCacheResourceInfoVector> resource_info_vector;
|
| if (appcache_group && appcache_group->newest_complete_cache()) {
|
| resource_info_vector.reset(new AppCacheResourceInfoVector);
|
| appcache_group->newest_complete_cache()->ToResourceInfoVector(
|
| @@ -287,7 +290,7 @@ void AppCacheInternalsUI::Proxy::OnResponseInfoLoaded(
|
| std::min(kLimit, response_info->response_data_size());
|
| scoped_refptr<net::IOBuffer> response_data(new net::IOBuffer(
|
| base::CheckedNumeric<size_t>(amount_to_read).ValueOrDie()));
|
| - scoped_ptr<AppCacheResponseReader> reader(
|
| + std::unique_ptr<AppCacheResponseReader> reader(
|
| appcache_service_->storage()->CreateResponseReader(
|
| GURL(response_enquiry.manifest_url), response_enquiry.group_id,
|
| response_enquiry.response_id));
|
| @@ -304,7 +307,7 @@ void AppCacheInternalsUI::Proxy::OnResponseInfoLoaded(
|
| void AppCacheInternalsUI::Proxy::OnResponseDataReadComplete(
|
| const ResponseEnquiry& response_enquiry,
|
| scoped_refptr<AppCacheResponseInfo> response_info,
|
| - scoped_ptr<AppCacheResponseReader> reader,
|
| + std::unique_ptr<AppCacheResponseReader> reader,
|
| scoped_refptr<net::IOBuffer> response_data,
|
| int net_result_code) {
|
| if (shutdown_called_)
|
| @@ -437,7 +440,7 @@ void AppCacheInternalsUI::OnAppCacheInfoDeleted(
|
| void AppCacheInternalsUI::OnAppCacheDetailsReady(
|
| const base::FilePath& partition_path,
|
| const std::string& manifest_url,
|
| - scoped_ptr<AppCacheResourceInfoVector> resource_info_vector) {
|
| + std::unique_ptr<AppCacheResourceInfoVector> resource_info_vector) {
|
| if (resource_info_vector) {
|
| web_ui()->CallJavascriptFunction(
|
| kFunctionOnAppCacheDetailsReady, base::StringValue(manifest_url),
|
|
|