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

Unified Diff: chrome/browser/extensions/api/developer_private/developer_private_api.cc

Issue 1991083002: Remove ExtensionFunction::SetResult(T*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU 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
Index: chrome/browser/extensions/api/developer_private/developer_private_api.cc
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
index 64b3fbe65a0daef1895a44313f590308670ceef8..2f1847f4350e972aa39d580d66148181b6c9b085 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/lazy_instance.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -967,7 +968,7 @@ void DeveloperPrivateLoadDirectoryFunction::Load() {
// TODO(grv) : The unpacked installer should fire an event when complete
// and return the extension_id.
- SetResult(new base::StringValue("-1"));
+ SetResult(base::MakeUnique<base::StringValue>("-1"));
SendResponse(true);
}
@@ -1155,7 +1156,8 @@ void DeveloperPrivateChoosePathFunction::FileSelectionCanceled() {
DeveloperPrivateChoosePathFunction::~DeveloperPrivateChoosePathFunction() {}
bool DeveloperPrivateIsProfileManagedFunction::RunSync() {
- SetResult(new base::FundamentalValue(GetProfile()->IsSupervised()));
+ SetResult(
+ base::MakeUnique<base::FundamentalValue>(GetProfile()->IsSupervised()));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698