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

Unified Diff: content/browser/presentation/presentation_service_impl.cc

Issue 2574673002: Removes ScopedVector from presentation_service_impl. (Closed)
Patch Set: 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
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),
« no previous file with comments | « content/browser/presentation/presentation_service_impl.h ('k') | content/public/browser/presentation_service_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698