Commit 4a895017 authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Replace Incognito with OffTheRecord in media router java code.

Wrongly used "Incognito" term in media router is replaced with
"OffTheRecord" to clearly represent all OffTheRecord profile types.

The native side is previously updated in: crrev.com/c/2212208

This CL does NOT result in any behavioral change and is just to improve
readability.

Bug: 1074201, 968028
Change-Id: Iedfa74187bc00b564069f0583ec5f62a0c8cf8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2256202Reviewed-by: default avatarmark a. foltz <mfoltz@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786634}
parent c327ca61
...@@ -274,12 +274,12 @@ public class ChromeMediaRouter implements MediaRouteManager { ...@@ -274,12 +274,12 @@ public class ChromeMediaRouter implements MediaRouteManager {
* @param presentationId the id of the presentation to be used by the page. * @param presentationId the id of the presentation to be used by the page.
* @param origin the origin of the frame requesting a new route. * @param origin the origin of the frame requesting a new route.
* @param tabId the id of the tab the requesting frame belongs to. * @param tabId the id of the tab the requesting frame belongs to.
* @param isIncognito whether the route is being requested from an Incognito profile. * @param isOffTheRecord whether the route is being requested from an OffTheRecord profile.
* @param requestId the id of the route creation request tracked by the native side. * @param requestId the id of the route creation request tracked by the native side.
*/ */
@CalledByNative @CalledByNative
public void createRoute(String sourceId, String sinkId, String presentationId, String origin, public void createRoute(String sourceId, String sinkId, String presentationId, String origin,
int tabId, boolean isIncognito, int requestId) { int tabId, boolean isOffTheRecord, int requestId) {
MediaRouteProvider provider = getProviderForSource(sourceId); MediaRouteProvider provider = getProviderForSource(sourceId);
if (provider == null) { if (provider == null) {
onRouteRequestError("No provider supports createRoute with source: " + sourceId onRouteRequestError("No provider supports createRoute with source: " + sourceId
...@@ -289,7 +289,7 @@ public class ChromeMediaRouter implements MediaRouteManager { ...@@ -289,7 +289,7 @@ public class ChromeMediaRouter implements MediaRouteManager {
} }
provider.createRoute( provider.createRoute(
sourceId, sinkId, presentationId, origin, tabId, isIncognito, requestId); sourceId, sinkId, presentationId, origin, tabId, isOffTheRecord, requestId);
} }
/** /**
......
...@@ -48,11 +48,11 @@ public interface MediaRouteProvider { ...@@ -48,11 +48,11 @@ public interface MediaRouteProvider {
* @param presentationId The presentation id generated for this route. * @param presentationId The presentation id generated for this route.
* @param origin The origin of the frame initiating the request. * @param origin The origin of the frame initiating the request.
* @param tabId The id of the tab containing the frame initiating the request. * @param tabId The id of the tab containing the frame initiating the request.
* @param isIncognito Whether the route is being requested from an Incognito profile. * @param isOffTheRecord Whether the route is being requested from an OffTheRecord profile.
* @param nativeRequestId The id of the request tracked by the native side. * @param nativeRequestId The id of the request tracked by the native side.
*/ */
void createRoute(String sourceId, String sinkId, String presentationId, String origin, void createRoute(String sourceId, String sinkId, String presentationId, String origin,
int tabId, boolean isIncognito, int nativeRequestId); int tabId, boolean isOffTheRecord, int nativeRequestId);
/** /**
* Tries to join an existing media route for the given media source and presentation id. * Tries to join an existing media route for the given media source and presentation id.
......
...@@ -36,7 +36,7 @@ public abstract class BaseNotificationController ...@@ -36,7 +36,7 @@ public abstract class BaseNotificationController
// we track the last foreground alive tab and update the notification with // we track the last foreground alive tab and update the notification with
// it? // it?
.setInstanceId(mSessionController.getRouteCreationInfo().tabId) .setInstanceId(mSessionController.getRouteCreationInfo().tabId)
.setPrivate(mSessionController.getRouteCreationInfo().isIncognito) .setPrivate(mSessionController.getRouteCreationInfo().isOffTheRecord)
.setActions(MediaNotificationInfo.ACTION_STOP) .setActions(MediaNotificationInfo.ACTION_STOP)
.setContentIntent(createContentIntent()) .setContentIntent(createContentIntent())
.setNotificationSmallIcon(R.drawable.ic_notification_media_route) .setNotificationSmallIcon(R.drawable.ic_notification_media_route)
......
...@@ -147,7 +147,7 @@ public abstract class CafBaseMediaRouteProvider ...@@ -147,7 +147,7 @@ public abstract class CafBaseMediaRouteProvider
@Override @Override
public final void createRoute(String sourceId, String sinkId, String presentationId, public final void createRoute(String sourceId, String sinkId, String presentationId,
String origin, int tabId, boolean isIncognito, int nativeRequestId) { String origin, int tabId, boolean isOffTheRecord, int nativeRequestId) {
Log.d(TAG, "createRoute"); Log.d(TAG, "createRoute");
if (sessionController().isConnected()) { if (sessionController().isConnected()) {
// If there is an active session or a pending create route request, force end the // If there is an active session or a pending create route request, force end the
...@@ -187,7 +187,7 @@ public abstract class CafBaseMediaRouteProvider ...@@ -187,7 +187,7 @@ public abstract class CafBaseMediaRouteProvider
this, CastSession.class); this, CastSession.class);
mPendingCreateRouteRequestInfo = new CreateRouteRequestInfo(source, sink, presentationId, mPendingCreateRouteRequestInfo = new CreateRouteRequestInfo(source, sink, presentationId,
origin, tabId, isIncognito, nativeRequestId, targetRouteInfo); origin, tabId, isOffTheRecord, nativeRequestId, targetRouteInfo);
sessionController().requestSessionLaunch(); sessionController().requestSessionLaunch();
} }
......
...@@ -16,19 +16,19 @@ public class CreateRouteRequestInfo { ...@@ -16,19 +16,19 @@ public class CreateRouteRequestInfo {
public final String presentationId; public final String presentationId;
public final String origin; public final String origin;
public final int tabId; public final int tabId;
public final boolean isIncognito; public final boolean isOffTheRecord;
public final int nativeRequestId; public final int nativeRequestId;
public final MediaRouter.RouteInfo routeInfo; public final MediaRouter.RouteInfo routeInfo;
public CreateRouteRequestInfo(MediaSource source, MediaSink sink, String presentationId, public CreateRouteRequestInfo(MediaSource source, MediaSink sink, String presentationId,
String origin, int tabId, boolean isIncognito, int nativeRequestId, String origin, int tabId, boolean isOffTheRecord, int nativeRequestId,
MediaRouter.RouteInfo routeInfo) { MediaRouter.RouteInfo routeInfo) {
this.source = source; this.source = source;
this.sink = sink; this.sink = sink;
this.presentationId = presentationId; this.presentationId = presentationId;
this.origin = origin; this.origin = origin;
this.tabId = tabId; this.tabId = tabId;
this.isIncognito = isIncognito; this.isOffTheRecord = isOffTheRecord;
this.nativeRequestId = nativeRequestId; this.nativeRequestId = nativeRequestId;
this.routeInfo = routeInfo; this.routeInfo = routeInfo;
} }
......
...@@ -281,7 +281,7 @@ public class CafBaseMediaRouteProviderTest { ...@@ -281,7 +281,7 @@ public class CafBaseMediaRouteProviderTest {
assertEquals(pendingCreateRouteRequestInfo.presentationId, "presentation-id"); assertEquals(pendingCreateRouteRequestInfo.presentationId, "presentation-id");
assertEquals(pendingCreateRouteRequestInfo.origin, "origin"); assertEquals(pendingCreateRouteRequestInfo.origin, "origin");
assertEquals(pendingCreateRouteRequestInfo.tabId, 1); assertEquals(pendingCreateRouteRequestInfo.tabId, 1);
assertEquals(pendingCreateRouteRequestInfo.isIncognito, false); assertEquals(pendingCreateRouteRequestInfo.isOffTheRecord, false);
assertEquals(pendingCreateRouteRequestInfo.nativeRequestId, 1); assertEquals(pendingCreateRouteRequestInfo.nativeRequestId, 1);
assertEquals(pendingCreateRouteRequestInfo.routeInfo, mMediaRouterHelper.getCastRoute()); assertEquals(pendingCreateRouteRequestInfo.routeInfo, mMediaRouterHelper.getCastRoute());
...@@ -298,7 +298,7 @@ public class CafBaseMediaRouteProviderTest { ...@@ -298,7 +298,7 @@ public class CafBaseMediaRouteProviderTest {
assertEquals(pendingCreateRouteRequestInfo.presentationId, "presentation-id-2"); assertEquals(pendingCreateRouteRequestInfo.presentationId, "presentation-id-2");
assertEquals(pendingCreateRouteRequestInfo.origin, "origin-2"); assertEquals(pendingCreateRouteRequestInfo.origin, "origin-2");
assertEquals(pendingCreateRouteRequestInfo.tabId, 2); assertEquals(pendingCreateRouteRequestInfo.tabId, 2);
assertEquals(pendingCreateRouteRequestInfo.isIncognito, true); assertEquals(pendingCreateRouteRequestInfo.isOffTheRecord, true);
assertEquals(pendingCreateRouteRequestInfo.nativeRequestId, 2); assertEquals(pendingCreateRouteRequestInfo.nativeRequestId, 2);
assertEquals( assertEquals(
pendingCreateRouteRequestInfo.routeInfo, mMediaRouterHelper.getOtherCastRoute()); pendingCreateRouteRequestInfo.routeInfo, mMediaRouterHelper.getOtherCastRoute());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment