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

Unified Diff: chrome/browser/ui/webui/foreign_session_handler.cc

Issue 2812953002: Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: 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/ui/webui/foreign_session_handler.cc
diff --git a/chrome/browser/ui/webui/foreign_session_handler.cc b/chrome/browser/ui/webui/foreign_session_handler.cc
index d8b1c255e03717dd5e3fe7221673cacb2e64a892..425ffff9c0ab71cfdfe64ece71034bb5c91d6ad6 100644
--- a/chrome/browser/ui/webui/foreign_session_handler.cc
+++ b/chrome/browser/ui/webui/foreign_session_handler.cc
@@ -121,7 +121,7 @@ std::unique_ptr<base::DictionaryValue> SessionWindowToValue(
return nullptr;
std::unique_ptr<base::DictionaryValue> dictionary(
BuildWindowData(window.timestamp, window.window_id.id()));
- dictionary->Set("tabs", tab_values.release());
+ dictionary->Set("tabs", std::move(tab_values));
return dictionary;
}
@@ -323,12 +323,12 @@ void ForeignSessionHandler::HandleGetForeignSessions(
if (tab_values->GetSize() != 0) {
std::unique_ptr<base::DictionaryValue> window_data(
BuildWindowData(modification_time, 1));
- window_data->Set("tabs", tab_values.release());
+ window_data->Set("tabs", std::move(tab_values));
window_list->Append(std::move(window_data));
}
}
- session_data->Set("windows", window_list.release());
+ session_data->Set("windows", std::move(window_list));
session_list.Append(std::move(session_data));
}
}

Powered by Google App Engine
This is Rietveld 408576698