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

Unified Diff: chrome/browser/extensions/window_controller.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/window_controller.cc
diff --git a/chrome/browser/extensions/window_controller.cc b/chrome/browser/extensions/window_controller.cc
index 67b3d47c4738ef0125a6d8b12440d2b145cef8e5..d1de9b4a6d8eba0ec684b9d191aac2c83476acc8 100644
--- a/chrome/browser/extensions/window_controller.cc
+++ b/chrome/browser/extensions/window_controller.cc
@@ -6,6 +6,8 @@
#include <stddef.h>
+#include <memory>
+
#include "base/values.h"
#include "chrome/browser/extensions/api/tabs/tabs_constants.h"
#include "chrome/browser/extensions/window_controller_list.h"
@@ -68,8 +70,9 @@ Browser* WindowController::GetBrowser() const {
namespace keys = tabs_constants;
-base::DictionaryValue* WindowController::CreateWindowValue() const {
- base::DictionaryValue* result = new base::DictionaryValue();
+std::unique_ptr<base::DictionaryValue> WindowController::CreateWindowValue()
+ const {
+ std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
result->SetInteger(keys::kIdKey, GetWindowId());
result->SetString(keys::kWindowTypeKey, GetWindowTypeText());

Powered by Google App Engine
This is Rietveld 408576698