| 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 f3f9d3d7b190ab84cdb6c0fa62f51936b1f8d6e3..65c6725bf4bec0b4dab09eec3c8453656afa9eaf 100644
|
| --- a/chrome/browser/media/router/mojo/media_router_mojo_impl.h
|
| +++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
|
| @@ -154,6 +154,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.
|
| @@ -188,9 +190,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;
|
| @@ -292,6 +291,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,
|
|
|