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

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

Issue 2627463003: Convert MediaRouter mojom apis to intake url::Origin objects instead of strings (Closed)
Patch Set: Add missing dependency for extensions_renderer_resources target Created 3 years, 10 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/media/router/presentation_request.cc
diff --git a/chrome/browser/media/router/presentation_request.cc b/chrome/browser/media/router/presentation_request.cc
index 89f7b4fb572e47c82dd78e0b2b47045d35dcb370..3952d0ade6c5e305544ac3536e515bbf2e27b1f6 100644
--- a/chrome/browser/media/router/presentation_request.cc
+++ b/chrome/browser/media/router/presentation_request.cc
@@ -11,10 +11,10 @@ namespace media_router {
PresentationRequest::PresentationRequest(
const RenderFrameHostId& render_frame_host_id,
const std::vector<GURL>& presentation_urls,
- const GURL& frame_url)
+ const url::Origin& frame_origin)
: render_frame_host_id_(render_frame_host_id),
presentation_urls_(presentation_urls),
- frame_url_(frame_url) {
+ frame_origin_(frame_origin) {
DCHECK(!presentation_urls_.empty());
}
@@ -26,7 +26,8 @@ PresentationRequest::~PresentationRequest() = default;
bool PresentationRequest::Equals(const PresentationRequest& other) const {
return render_frame_host_id_ == other.render_frame_host_id_ &&
presentation_urls_ == other.presentation_urls_ &&
- frame_url_ == other.frame_url_;
+ ((frame_origin_.unique() && other.frame_origin_.unique()) ||
+ (frame_origin_ == other.frame_origin_));
}
std::vector<MediaSource> PresentationRequest::GetMediaSources() const {
« no previous file with comments | « chrome/browser/media/router/presentation_request.h ('k') | chrome/browser/media/router/presentation_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698