Commit f6599ea6 authored by Ted Choc's avatar Ted Choc Committed by Commit Bot

Add strict mode exemption to DeviceUtils#addDeviceSpecificUserAgentSwitch

BUG=878704

Change-Id: I30dbc348c2a8b5e7440822993dae21c92784fa47
Reviewed-on: https://chromium-review.googlesource.com/1195922Reviewed-by: default avatarJinsuk Kim <jinsukkim@chromium.org>
Commit-Queue: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587360}
parent 89164d99
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
package org.chromium.content.browser; package org.chromium.content.browser;
import org.chromium.base.CommandLine; import org.chromium.base.CommandLine;
import org.chromium.base.StrictModeContext;
import org.chromium.content_public.common.ContentSwitches; import org.chromium.content_public.common.ContentSwitches;
import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.base.DeviceFormFactor;
...@@ -15,8 +16,10 @@ public class DeviceUtilsImpl { ...@@ -15,8 +16,10 @@ public class DeviceUtilsImpl {
private DeviceUtilsImpl() {} private DeviceUtilsImpl() {}
public static void addDeviceSpecificUserAgentSwitch() { public static void addDeviceSpecificUserAgentSwitch() {
if (!DeviceFormFactor.isTablet()) { try (StrictModeContext unused = StrictModeContext.allowDiskReads()) {
CommandLine.getInstance().appendSwitch(ContentSwitches.USE_MOBILE_UA); if (!DeviceFormFactor.isTablet()) {
CommandLine.getInstance().appendSwitch(ContentSwitches.USE_MOBILE_UA);
}
} }
} }
} }
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