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

Unified Diff: extensions/browser/api/storage/storage_api.cc

Issue 2038613003: Revert of ExtensionFunction: don't pass ownership of base::Value by raw pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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 | « extensions/browser/api/runtime/runtime_api.cc ('k') | extensions/browser/api/usb/usb_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/storage/storage_api.cc
diff --git a/extensions/browser/api/storage/storage_api.cc b/extensions/browser/api/storage/storage_api.cc
index 8b526f86c366de0df076bfcfcb73c48b4df71c27..4b1928e471112682d329028b1099c4a257f98106 100644
--- a/extensions/browser/api/storage/storage_api.cc
+++ b/extensions/browser/api/storage/storage_api.cc
@@ -78,9 +78,9 @@
if (!result->status().ok())
return Error(result->status().message);
- std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+ base::DictionaryValue* dict = new base::DictionaryValue();
dict->Swap(&result->settings());
- return OneArgument(std::move(dict));
+ return OneArgument(dict);
}
ExtensionFunction::ResponseValue SettingsFunction::UseWriteResult(
@@ -217,7 +217,7 @@
}
return OneArgument(
- base::MakeUnique<base::FundamentalValue>(static_cast<int>(bytes_in_use)));
+ new base::FundamentalValue(static_cast<int>(bytes_in_use)));
}
ExtensionFunction::ResponseValue StorageStorageAreaSetFunction::RunWithStorage(
« no previous file with comments | « extensions/browser/api/runtime/runtime_api.cc ('k') | extensions/browser/api/usb/usb_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698