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

Unified Diff: chrome/browser/extensions/api/tabs/app_window_controller.cc

Issue 2777063003: Stop passing raw pointers to base::Value API in c/b/chromeos and c/b/extensions (Closed)
Patch Set: Just rebased Created 3 years, 8 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/tabs/app_window_controller.cc
diff --git a/chrome/browser/extensions/api/tabs/app_window_controller.cc b/chrome/browser/extensions/api/tabs/app_window_controller.cc
index 6831e346d51ed7271de0274b8c4df91a5500a702..bc8272b841732e5527daa2c849fb421ee18d0b9c 100644
--- a/chrome/browser/extensions/api/tabs/app_window_controller.cc
+++ b/chrome/browser/extensions/api/tabs/app_window_controller.cc
@@ -7,6 +7,7 @@
#include <memory>
#include <utility>
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/extensions/api/tabs/app_base_window.h"
@@ -56,9 +57,9 @@ AppWindowController::CreateWindowValueWithTabs(
if (!tab_value)
return result;
- base::ListValue* tab_list = new base::ListValue();
+ auto tab_list = base::MakeUnique<base::ListValue>();
tab_list->Append(std::move(tab_value));
- result->Set(tabs_constants::kTabsKey, tab_list);
+ result->Set(tabs_constants::kTabsKey, std::move(tab_list));
return result;
}

Powered by Google App Engine
This is Rietveld 408576698