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

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: return an Origin instead of GURL for GetLastCommittedURLForFrame Created 3 years, 11 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()) ||
mark a. foltz 2017/01/24 04:04:17 Not all unique origins should be treated as equal
steimel 2017/01/25 19:01:11 Discussed offline. Leaving as-is for now
+ (frame_origin_ == other.frame_origin_));
}
std::vector<MediaSource> PresentationRequest::GetMediaSources() const {

Powered by Google App Engine
This is Rietveld 408576698