Chromium Code Reviews| Index: content/browser/presentation/presentation_service_impl.cc |
| diff --git a/content/browser/presentation/presentation_service_impl.cc b/content/browser/presentation/presentation_service_impl.cc |
| index 1a23a37ed6103e17bbd7ad61ee4eac6cc63b252c..eeb8c3d7834343932e56d50d53bd4fa0e56f1b9b 100644 |
| --- a/content/browser/presentation/presentation_service_impl.cc |
| +++ b/content/browser/presentation/presentation_service_impl.cc |
| @@ -464,16 +464,16 @@ void PresentationServiceImpl::ListenForSessionMessages( |
| void PresentationServiceImpl::OnSessionMessages( |
| const PresentationSessionInfo& session, |
| - const ScopedVector<PresentationSessionMessage>& messages, |
| + const std::vector<std::unique_ptr<PresentationSessionMessage>>& messages, |
| bool pass_ownership) { |
| DCHECK(client_); |
| DVLOG(2) << "OnSessionMessages"; |
| std::vector<blink::mojom::SessionMessagePtr> mojo_messages(messages.size()); |
| - std::transform(messages.begin(), messages.end(), mojo_messages.begin(), |
| - [pass_ownership](PresentationSessionMessage* message) { |
| - return ToMojoSessionMessage(message, pass_ownership); |
| - }); |
| + for (size_t i = 0; i < messages.size(); i++) { |
|
Avi (use Gerrit)
2016/12/13 04:45:31
for (const auto& message : messages)
?
Also, why
CJ
2016/12/13 23:01:31
Done.
Was having a hard time getting it to compil
|
| + mojo_messages.push_back( |
| + ToMojoSessionMessage(messages[i].get(), pass_ownership)); |
| + } |
| client_->OnSessionMessagesReceived( |
| blink::mojom::PresentationSessionInfo::From(session), |