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

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

Issue 2958663002: [MediaRouter] PresentationServiceDelegateImpl cleanup. (Closed)
Patch Set: rebase Created 3 years, 5 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
« no previous file with comments | « chrome/browser/media/router/presentation_service_delegate_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c6ed4919f04155cde5b51649d5d935b71f32b835..4411641ba90ab029892a2b4ebdaa007e7d9106f4 100644
--- a/content/browser/presentation/presentation_service_impl.cc
+++ b/content/browser/presentation/presentation_service_impl.cc
@@ -125,7 +125,7 @@ void PresentationServiceImpl::SetClient(
void PresentationServiceImpl::ListenForScreenAvailability(const GURL& url) {
DVLOG(2) << "ListenForScreenAvailability " << url.spec();
- if (!controller_delegate_) {
+ if (!controller_delegate_ || !url.is_valid()) {
client_->OnScreenAvailabilityUpdated(
url, blink::mojom::ScreenAvailability::UNAVAILABLE);
return;
@@ -464,13 +464,13 @@ PresentationServiceImpl::ScreenAvailabilityListenerImpl::
ScreenAvailabilityListenerImpl(const GURL& availability_url,
PresentationServiceImpl* service)
: availability_url_(availability_url), service_(service) {
+ DCHECK(availability_url_.is_valid());
DCHECK(service_);
DCHECK(service_->client_.get());
}
PresentationServiceImpl::ScreenAvailabilityListenerImpl::
-~ScreenAvailabilityListenerImpl() {
-}
+ ~ScreenAvailabilityListenerImpl() = default;
GURL PresentationServiceImpl::ScreenAvailabilityListenerImpl::
GetAvailabilityUrl() const {
« no previous file with comments | « chrome/browser/media/router/presentation_service_delegate_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698