diff options
| author | John Reck <jreck@google.com> | 2011-02-23 16:42:10 -0800 |
|---|---|---|
| committer | John Reck <jreck@google.com> | 2011-02-23 16:42:10 -0800 |
| commit | ab5901dab21964b01095f29a51db1c7d670a38c7 (patch) | |
| tree | 8a05c069ffec3fd0fff53cb718b1c482c9704bcf /core/java/android/webkit/HTML5VideoViewProxy.java | |
| parent | e86c12c9e489e7f04c49a7733fc4014668e012e2 (diff) | |
Add x- header to prevent url logging in incognito
Bug: 3336575
Change-Id: I4a65242405d731f74c676382a810f608afcaad39
Diffstat (limited to 'core/java/android/webkit/HTML5VideoViewProxy.java')
| -rw-r--r-- | core/java/android/webkit/HTML5VideoViewProxy.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java index 3caf3452822b..2cc3881fdf3e 100644 --- a/core/java/android/webkit/HTML5VideoViewProxy.java +++ b/core/java/android/webkit/HTML5VideoViewProxy.java @@ -77,6 +77,7 @@ class HTML5VideoViewProxy extends Handler private static final int PAUSED = 203; private static final String COOKIE = "Cookie"; + private static final String HIDE_URL_LOGS = "x-hide-urls-from-log"; // Timer thread -> UI thread private static final int TIMEUPDATE = 300; @@ -184,11 +185,13 @@ class HTML5VideoViewProxy extends Handler mVideoView.setMediaController(new MediaController(proxy.getContext())); String cookieValue = CookieManager.getInstance().getCookie(url); - Map<String, String> headers = null; + Map<String, String> headers = new HashMap<String, String>(); if (cookieValue != null) { - headers = new HashMap<String, String>(); headers.put(COOKIE, cookieValue); } + if (mCurrentProxy.getWebView().isPrivateBrowsingEnabled()) { + headers.put(HIDE_URL_LOGS, "true"); + } mVideoView.setVideoURI(Uri.parse(url), headers); mVideoView.setOnCompletionListener(proxy); |
