| Index: chrome/browser/media/router/media_router_mojo_impl.cc
|
| diff --git a/chrome/browser/media/router/media_router_mojo_impl.cc b/chrome/browser/media/router/media_router_mojo_impl.cc
|
| index eaf5e3b2292901fd30c0d448fad0c5a4553fc7cf..db01cd136ffb8a171b9c0bbe5437ccae57b8790e 100644
|
| --- a/chrome/browser/media/router/media_router_mojo_impl.cc
|
| +++ b/chrome/browser/media/router/media_router_mojo_impl.cc
|
| @@ -41,7 +41,7 @@ ConvertToPresentationSessionMessage(interfaces::RouteMessagePtr input) {
|
| DCHECK(!input.is_null());
|
| scoped_ptr<content::PresentationSessionMessage> output;
|
| switch (input->type) {
|
| - case interfaces::RouteMessage::Type::TYPE_TEXT: {
|
| + case interfaces::RouteMessage::Type::TEXT: {
|
| DCHECK(!input->message.is_null());
|
| DCHECK(input->data.is_null());
|
| output.reset(new content::PresentationSessionMessage(
|
| @@ -49,7 +49,7 @@ ConvertToPresentationSessionMessage(interfaces::RouteMessagePtr input) {
|
| input->message.Swap(&output->message);
|
| return output;
|
| }
|
| - case interfaces::RouteMessage::Type::TYPE_BINARY: {
|
| + case interfaces::RouteMessage::Type::BINARY: {
|
| DCHECK(!input->data.is_null());
|
| DCHECK(input->message.is_null());
|
| output.reset(new content::PresentationSessionMessage(
|
| @@ -100,7 +100,7 @@ MediaRouterMojoImpl::MediaRouterMojoImpl(
|
| : event_page_tracker_(event_page_tracker),
|
| instance_id_(base::GenerateGUID()),
|
| has_local_display_route_(false),
|
| - availability_(interfaces::MediaRouter::SINK_AVAILABILITY_UNAVAILABLE),
|
| + availability_(interfaces::MediaRouter::SinkAvailability::UNAVAILABLE),
|
| wakeup_attempt_count_(0),
|
| current_wake_reason_(MediaRouteProviderWakeReason::TOTAL_COUNT),
|
| weak_factory_(this) {
|
| @@ -387,7 +387,7 @@ bool MediaRouterMojoImpl::RegisterMediaSinksObserver(
|
| // no need to call to MRPM.
|
| // TODO(imcheng): Implement caching. (crbug.com/492451)
|
| sinks_query->observers.AddObserver(observer);
|
| - if (availability_ != interfaces::MediaRouter::SINK_AVAILABILITY_UNAVAILABLE) {
|
| + if (availability_ != interfaces::MediaRouter::SinkAvailability::UNAVAILABLE) {
|
| SetWakeReason(MediaRouteProviderWakeReason::START_OBSERVING_MEDIA_SINKS);
|
| RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoStartObservingMediaSinks,
|
| base::Unretained(this), source_id));
|
| @@ -418,7 +418,7 @@ void MediaRouterMojoImpl::UnregisterMediaSinksObserver(
|
| // UNAVAILABLE.
|
| // Otherwise, the MRPM would have discarded the queries already.
|
| if (availability_ !=
|
| - interfaces::MediaRouter::SINK_AVAILABILITY_UNAVAILABLE) {
|
| + interfaces::MediaRouter::SinkAvailability::UNAVAILABLE) {
|
| SetWakeReason(MediaRouteProviderWakeReason::STOP_OBSERVING_MEDIA_SINKS);
|
| // The |sinks_queries_| entry will be removed in the immediate or deferred
|
| // |DoStopObservingMediaSinks| call.
|
| @@ -661,7 +661,7 @@ void MediaRouterMojoImpl::OnSinkAvailabilityUpdated(
|
| return;
|
|
|
| availability_ = availability;
|
| - if (availability_ == interfaces::MediaRouter::SINK_AVAILABILITY_UNAVAILABLE) {
|
| + if (availability_ == interfaces::MediaRouter::SinkAvailability::UNAVAILABLE) {
|
| // Sinks are no longer available. MRPM has already removed all sink queries.
|
| for (auto& source_and_query : sinks_queries_)
|
| source_and_query.second->is_active = false;
|
| @@ -695,7 +695,7 @@ void MediaRouterMojoImpl::DoStartObservingMediaSinks(
|
| const MediaSource::Id& source_id) {
|
| DVLOG_WITH_INSTANCE(1) << "DoStartObservingMediaSinks: " << source_id;
|
| // No need to call MRPM if there are no sinks available.
|
| - if (availability_ == interfaces::MediaRouter::SINK_AVAILABILITY_UNAVAILABLE)
|
| + if (availability_ == interfaces::MediaRouter::SinkAvailability::UNAVAILABLE)
|
| return;
|
|
|
| // No need to call MRPM if all observers have been removed in the meantime.
|
|
|