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

Unified Diff: extensions/browser/api/system_storage/system_storage_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: extensions/browser/api/system_storage/system_storage_api.cc
diff --git a/extensions/browser/api/system_storage/system_storage_api.cc b/extensions/browser/api/system_storage/system_storage_api.cc
index cd20f4f6b4cf89ae74a9abb07bcb862b6d0eca6c..2629d68f3a5da19c3f144ab4925595301d228066 100644
--- a/extensions/browser/api/system_storage/system_storage_api.cc
+++ b/extensions/browser/api/system_storage/system_storage_api.cc
@@ -4,6 +4,8 @@
#include "extensions/browser/api/system_storage/system_storage_api.h"
+#include "base/memory/ptr_util.h"
+
using storage_monitor::StorageMonitor;
namespace extensions {
@@ -88,7 +90,8 @@ void SystemStorageEjectDeviceFunction::HandleResponse(
result = api::system_storage::EJECT_DEVICE_RESULT_CODE_FAILURE;
}
- SetResult(new base::StringValue(api::system_storage::ToString(result)));
+ SetResult(base::MakeUnique<base::StringValue>(
+ api::system_storage::ToString(result)));
SendResponse(true);
}
@@ -136,7 +139,7 @@ void SystemStorageGetAvailableCapacityFunction::OnQueryCompleted(
api::system_storage::StorageAvailableCapacityInfo result;
result.id = transient_id;
result.available_capacity = available_capacity;
- SetResult(result.ToValue().release());
+ SetResult(result.ToValue());
} else {
SetError("Error occurred when querying available capacity.");
}

Powered by Google App Engine
This is Rietveld 408576698