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

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

Issue 2323993004: Remove use of deprecated base::ListValue::Append(Value*) overload in extensions. (Closed)
Patch Set: ... I hate C++ Created 4 years, 3 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 38e717924b0f2ffa4184b6be37bc54370dd61d3e..6831e346d51ed7271de0274b8c4df91a5500a702 100644
--- a/chrome/browser/extensions/api/tabs/app_window_controller.cc
+++ b/chrome/browser/extensions/api/tabs/app_window_controller.cc
@@ -51,23 +51,18 @@ AppWindowController::CreateWindowValueWithTabs(
const Extension* extension) const {
std::unique_ptr<base::DictionaryValue> result = CreateWindowValue();
- base::DictionaryValue* tab_value = CreateTabValue(extension, 0);
+ std::unique_ptr<base::DictionaryValue> tab_value =
+ CreateTabObject(extension, 0)->ToValue();
if (!tab_value)
return result;
base::ListValue* tab_list = new base::ListValue();
- tab_list->Append(tab_value);
+ tab_list->Append(std::move(tab_value));
result->Set(tabs_constants::kTabsKey, tab_list);
return result;
}
-base::DictionaryValue* AppWindowController::CreateTabValue(
- const Extension* extension,
- int tab_index) const {
- return CreateTabObject(extension, tab_index)->ToValue().release();
-}
-
std::unique_ptr<api::tabs::Tab> AppWindowController::CreateTabObject(
const extensions::Extension* extension,
int tab_index) const {
« no previous file with comments | « chrome/browser/extensions/api/tabs/app_window_controller.h ('k') | chrome/browser/extensions/api/tabs/tabs_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698