| Index: chrome/browser/media/router/mojo/media_router_mojo_impl.h
|
| diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.h b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
|
| index 8f311c9a84260ca91ba3c3d2472c90688953bbed..06f15de3c094173822085f149a93dacd55eae874 100644
|
| --- a/chrome/browser/media/router/mojo/media_router_mojo_impl.h
|
| +++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
|
| @@ -165,6 +165,8 @@ class MediaRouterMojoImpl : public MediaRouterBase,
|
| AttemptedWakeupTooManyTimes);
|
| FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoExtensionTest,
|
| WakeupFailedDrainsQueue);
|
| + FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoExtensionTest,
|
| + SyncStateToMediaRouteProvider);
|
|
|
| // The max number of pending requests allowed. When number of pending requests
|
| // exceeds this number, the oldest request will be dropped.
|
| @@ -199,9 +201,6 @@ class MediaRouterMojoImpl : public MediaRouterBase,
|
| MediaRoutesQuery();
|
| ~MediaRoutesQuery();
|
|
|
| - // True if the query has been sent to the MRPM. False otherwise.
|
| - bool is_active = false;
|
| -
|
| // Cached list of routes and joinable route IDs for the query.
|
| base::Optional<std::vector<MediaRoute>> cached_route_list;
|
| std::vector<std::string> joinable_route_ids;
|
| @@ -309,6 +308,17 @@ class MediaRouterMojoImpl : public MediaRouterBase,
|
| // Error handler callback for |binding_| and |media_route_provider_|.
|
| void OnConnectionError();
|
|
|
| + // Issues 0+ calls to |media_route_provider_| to ensure its state is in sync
|
| + // with MediaRouter on a best-effort basis. This method can be only called if
|
| + // |media_route_provider_| is a valid handle.
|
| + // The extension might have become out of sync with MediaRouter due to one
|
| + // of few reasons:
|
| + // (1) The extension crashed and lost unpersisted changes.
|
| + // (2) The extension was updated; temporary data is cleared.
|
| + // (3) The extension has an unforseen bug which causes temporary data to be
|
| + // persisted incorrectly on suspension.
|
| + void SyncStateToMediaRouteProvider();
|
| +
|
| // mojom::MediaRouter implementation.
|
| void RegisterMediaRouteProvider(
|
| mojom::MediaRouteProviderPtr media_route_provider_ptr,
|
|
|