Commit d47586ce authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

IWYU: Include <algorithm> in secure_display_link_tracker.h.

Recent changes that removed some includes such as a92b7636 ("[MessageLoop]
Fix random IWYU preventing message_loop.h cleanup") and
629ba73c ("[MessageLoop] Fix message_loop.h includes") have broken the
build with libstdc++, as secure_display_link_tracker.h uses std::find() but
relied on it being included implicitly by other headers:

    In file included from ../../base/memory/weak_ptr.h:77:0,
                     from ../../content/renderer/media/stream/media_stream_video_source.h:13,
                     from ../../content/renderer/media/stream/media_stream_video_source.cc:5:
    ../../content/renderer/media/stream/secure_display_link_tracker.h: In instantiation of ‘void SecureDisplayLinkTracker<T>::Add(T*, bool) [with T = content::MediaStreamVideoTrack]’:
    ../../content/renderer/media/stream/media_stream_video_source.cc:55:34:   required from here
    ../../content/renderer/media/stream/secure_display_link_tracker.h:32:19: error: no matching function for call to ‘find(std::vector<content::MediaStreamVideoTrack*>::iterator, std::vector<content::MediaStreamVideoTrack*>::iterator, content::MediaStreamVideoTrack*&)’
       DCHECK(std::find(insecure_links_.begin(), insecure_links_.end(), link) ==
              ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../base/logging.h:888:54: note: in definition of macro ‘DCHECK’
     #define DCHECK(condition) EAT_STREAM_PARAMETERS << !(condition)
                                                          ^~~~~~~~~

Bug: 819294
Change-Id: I1e747d7e15a7be74460012fbe5f207368744114b
Reviewed-on: https://chromium-review.googlesource.com/1043749Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#556190}
parent afd725a7
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifndef CONTENT_RENDERER_MEDIA_STREAM_SECURE_DISPLAY_LINK_TRACKER_H_ #ifndef CONTENT_RENDERER_MEDIA_STREAM_SECURE_DISPLAY_LINK_TRACKER_H_
#define CONTENT_RENDERER_MEDIA_STREAM_SECURE_DISPLAY_LINK_TRACKER_H_ #define CONTENT_RENDERER_MEDIA_STREAM_SECURE_DISPLAY_LINK_TRACKER_H_
#include <algorithm>
#include <vector> #include <vector>
// Tracks all connected links (video sinks / tracks), and reports if they are // Tracks all connected links (video sinks / tracks), and reports if they are
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment