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

Unified Diff: extensions/browser/api/runtime/runtime_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/management/management_api.cc ('k') | extensions/browser/api/storage/storage_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/runtime/runtime_api.cc
diff --git a/extensions/browser/api/runtime/runtime_api.cc b/extensions/browser/api/runtime/runtime_api.cc
index 08eed6ef157af9bf9a74ac3cbd0d81e9e60dd71c..e62805e674289632f33a1786b7a89eac8b06d478 100644
--- a/extensions/browser/api/runtime/runtime_api.cc
+++ b/extensions/browser/api/runtime/runtime_api.cc
@@ -9,7 +9,6 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
-#include "base/memory/ptr_util.h"
#include "base/metrics/histogram.h"
#include "base/values.h"
#include "base/version.h"
@@ -532,13 +531,12 @@
void RuntimeRequestUpdateCheckFunction::CheckComplete(
const RuntimeAPIDelegate::UpdateCheckResult& result) {
if (result.success) {
- std::unique_ptr<base::DictionaryValue> details(new base::DictionaryValue);
+ base::DictionaryValue* details = new base::DictionaryValue;
details->SetString("version", result.version);
- Respond(TwoArguments(base::MakeUnique<base::StringValue>(result.response),
- std::move(details)));
+ Respond(TwoArguments(new base::StringValue(result.response), details));
} else {
// HMM(kalman): Why does !success not imply Error()?
- Respond(OneArgument(base::MakeUnique<base::StringValue>(result.response)));
+ Respond(OneArgument(new base::StringValue(result.response)));
}
}
@@ -579,10 +577,10 @@
content::ChildProcessSecurityPolicy* policy =
content::ChildProcessSecurityPolicy::GetInstance();
policy->GrantReadFileSystem(renderer_id, filesystem_id);
- std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+ base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetString("fileSystemId", filesystem_id);
dict->SetString("baseName", relative_path);
- return RespondNow(OneArgument(std::move(dict)));
+ return RespondNow(OneArgument(dict));
}
} // namespace extensions
« no previous file with comments | « extensions/browser/api/management/management_api.cc ('k') | extensions/browser/api/storage/storage_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698