Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: Rebase and fix build Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import org.chromium.base.CommandLine; 9 import org.chromium.base.CommandLine;
10 import org.chromium.content.common.ContentSwitches; 10 import org.chromium.content.common.ContentSwitches;
11 import org.chromium.ui.base.DeviceFormFactor; 11 import org.chromium.ui.base.DeviceFormFactor;
12 12
13 /** 13 /**
14 * A utility class that has helper methods for device configuration. 14 * A utility class that has helper methods for device configuration.
15 */ 15 */
16 public class DeviceUtils { 16 public class DeviceUtils {
17 17
18 /** 18 /**
19 * Appends the switch specifying which user agent should be used for this de vice. 19 * Appends the switch specifying which user agent should be used for this de vice.
20 * @param context The context for the caller activity. 20 * @param context The context for the caller activity.
21 */ 21 */
22 public static void addDeviceSpecificUserAgentSwitch(Context context) { 22 public static void addDeviceSpecificUserAgentSwitch(Context context) {
23 if (!DeviceFormFactor.isTablet(context)) { 23 if (!DeviceFormFactor.isTablet()) {
24 CommandLine.getInstance().appendSwitch(ContentSwitches.USE_MOBILE_UA ); 24 CommandLine.getInstance().appendSwitch(ContentSwitches.USE_MOBILE_UA );
25 } 25 }
26 } 26 }
27 } 27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698