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

Unified Diff: chrome/browser/extensions/api/gcm/gcm_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/gcm/gcm_api.cc
diff --git a/chrome/browser/extensions/api/gcm/gcm_api.cc b/chrome/browser/extensions/api/gcm/gcm_api.cc
index cebe90e0833314bd2d7d4cc64058fba5b51655d3..c58cf8f26a411ad4d026d0c1dc51ebd920d3a3ba 100644
--- a/chrome/browser/extensions/api/gcm/gcm_api.cc
+++ b/chrome/browser/extensions/api/gcm/gcm_api.cc
@@ -11,6 +11,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -127,7 +128,7 @@ bool GcmRegisterFunction::DoWork() {
void GcmRegisterFunction::CompleteFunctionWithResult(
const std::string& registration_id,
gcm::GCMClient::Result result) {
- SetResult(new base::StringValue(registration_id));
+ SetResult(base::MakeUnique<base::StringValue>(registration_id));
SetError(GcmResultToError(result));
SendResponse(gcm::GCMClient::SUCCESS == result);
}
@@ -181,7 +182,7 @@ bool GcmSendFunction::DoWork() {
void GcmSendFunction::CompleteFunctionWithResult(
const std::string& message_id,
gcm::GCMClient::Result result) {
- SetResult(new base::StringValue(message_id));
+ SetResult(base::MakeUnique<base::StringValue>(message_id));
SetError(GcmResultToError(result));
SendResponse(gcm::GCMClient::SUCCESS == result);
}

Powered by Google App Engine
This is Rietveld 408576698