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

Unified Diff: chrome/browser/media/router/presentation_service_delegate_impl.cc

Issue 2574673002: Removes ScopedVector from presentation_service_impl. (Closed)
Patch Set: Fixes test. Created 4 years 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
« no previous file with comments | « no previous file | content/browser/presentation/presentation_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/router/presentation_service_delegate_impl.cc
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl.cc b/chrome/browser/media/router/presentation_service_delegate_impl.cc
index 2044080c6a7543274ad75b14bcb444018e172a4d..7b5301f1c4e1a99e986cbd1e51328493bbb2fa38 100644
--- a/chrome/browser/media/router/presentation_service_delegate_impl.cc
+++ b/chrome/browser/media/router/presentation_service_delegate_impl.cc
@@ -92,16 +92,17 @@ class PresentationSessionMessagesObserver : public RouteMessageObserver {
void OnMessagesReceived(const std::vector<RouteMessage>& messages) final {
DVLOG(2) << __func__ << ", number of messages : " << messages.size();
- ScopedVector<content::PresentationConnectionMessage> presentation_messages;
+ std::vector<std::unique_ptr<content::PresentationConnectionMessage>>
+ presentation_messages;
for (const RouteMessage& message : messages) {
if (message.type == RouteMessage::TEXT && message.text) {
presentation_messages.push_back(
- new content::PresentationConnectionMessage(
+ base::MakeUnique<content::PresentationConnectionMessage>(
content::PresentationMessageType::TEXT));
presentation_messages.back()->message = *message.text;
} else if (message.type == RouteMessage::BINARY && message.binary) {
presentation_messages.push_back(
- new content::PresentationConnectionMessage(
+ base::MakeUnique<content::PresentationConnectionMessage>(
content::PresentationMessageType::BINARY));
presentation_messages.back()->data.reset(
new std::vector<uint8_t>(*message.binary));
« no previous file with comments | « no previous file | content/browser/presentation/presentation_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698