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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.chrome.browser.dom_distiller; 5 package org.chromium.chrome.browser.dom_distiller;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.text.TextUtils; 8 import android.text.TextUtils;
9 9
10 import org.chromium.base.CommandLine; 10 import org.chromium.base.CommandLine;
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 636
637 /** 637 /**
638 * @return Whether Reader mode and its new UI are enabled. 638 * @return Whether Reader mode and its new UI are enabled.
639 * @param context A context 639 * @param context A context
640 */ 640 */
641 public static boolean isEnabled(Context context) { 641 public static boolean isEnabled(Context context) {
642 if (context == null) return false; 642 if (context == null) return false;
643 643
644 boolean enabled = CommandLine.getInstance().hasSwitch(ChromeSwitches.ENA BLE_DOM_DISTILLER) 644 boolean enabled = CommandLine.getInstance().hasSwitch(ChromeSwitches.ENA BLE_DOM_DISTILLER)
645 && !CommandLine.getInstance().hasSwitch( 645 && !CommandLine.getInstance().hasSwitch(
646 ChromeSwitches.DISABLE_READER_MODE_BOTTOM_BAR) 646 ChromeSwitches.DISABLE_READER_MODE_BOTTOM_BAR)
647 && !DeviceFormFactor.isTablet(context) 647 && !DeviceFormFactor.isTablet()
648 && DomDistillerTabUtils.isDistillerHeuristicsEnabled() 648 && DomDistillerTabUtils.isDistillerHeuristicsEnabled()
649 && !SysUtils.isLowEndDevice(); 649 && !SysUtils.isLowEndDevice();
650 return enabled; 650 return enabled;
651 } 651 }
652 } 652 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698