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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java

Issue 2623643002: Add TOS-accepted Java pref on Android. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunGlueImpl.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.util; 5 package org.chromium.chrome.browser.util;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.Intent; 10 import android.content.Intent;
11 import android.content.pm.PackageManager; 11 import android.content.pm.PackageManager;
12 import android.content.pm.ResolveInfo; 12 import android.content.pm.ResolveInfo;
13 import android.os.Build; 13 import android.os.Build;
14 import android.os.Bundle; 14 import android.os.Bundle;
15 import android.os.StrictMode; 15 import android.os.StrictMode;
16 import android.os.UserManager; 16 import android.os.UserManager;
17 import android.speech.RecognizerIntent; 17 import android.speech.RecognizerIntent;
18 import android.text.TextUtils; 18 import android.text.TextUtils;
19 19
20 import org.chromium.base.CommandLine; 20 import org.chromium.base.CommandLine;
21 import org.chromium.base.ContextUtils; 21 import org.chromium.base.ContextUtils;
22 import org.chromium.base.FieldTrialList; 22 import org.chromium.base.FieldTrialList;
23 import org.chromium.base.Log; 23 import org.chromium.base.Log;
24 import org.chromium.base.ThreadUtils; 24 import org.chromium.base.ThreadUtils;
25 import org.chromium.base.VisibleForTesting; 25 import org.chromium.base.VisibleForTesting;
26 import org.chromium.chrome.browser.ApplicationLifetime; 26 import org.chromium.chrome.browser.ApplicationLifetime;
27 import org.chromium.chrome.browser.ChromeFeatureList; 27 import org.chromium.chrome.browser.ChromeFeatureList;
28 import org.chromium.chrome.browser.ChromeSwitches; 28 import org.chromium.chrome.browser.ChromeSwitches;
29 import org.chromium.chrome.browser.download.DownloadUtils; 29 import org.chromium.chrome.browser.download.DownloadUtils;
30 import org.chromium.chrome.browser.firstrun.FirstRunGlueImpl;
30 import org.chromium.chrome.browser.instantapps.InstantAppsHandler; 31 import org.chromium.chrome.browser.instantapps.InstantAppsHandler;
31 import org.chromium.chrome.browser.preferences.ChromePreferenceManager; 32 import org.chromium.chrome.browser.preferences.ChromePreferenceManager;
32 import org.chromium.chrome.browser.tabmodel.DocumentModeAssassin; 33 import org.chromium.chrome.browser.tabmodel.DocumentModeAssassin;
33 import org.chromium.chrome.browser.webapps.ChromeWebApkHost; 34 import org.chromium.chrome.browser.webapps.ChromeWebApkHost;
34 import org.chromium.components.signin.AccountManagerHelper; 35 import org.chromium.components.signin.AccountManagerHelper;
35 import org.chromium.ui.base.DeviceFormFactor; 36 import org.chromium.ui.base.DeviceFormFactor;
36 37
37 import java.util.List; 38 import java.util.List;
38 39
39 /** 40 /**
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 185
185 /** 186 /**
186 * Caches flags that must take effect on startup but are set via native code . 187 * Caches flags that must take effect on startup but are set via native code .
187 */ 188 */
188 public static void cacheNativeFlags() { 189 public static void cacheNativeFlags() {
189 cacheHerbFlavor(); 190 cacheHerbFlavor();
190 DownloadUtils.cacheIsDownloadHomeEnabled(); 191 DownloadUtils.cacheIsDownloadHomeEnabled();
191 InstantAppsHandler.getInstance().cacheInstantAppsEnabled(); 192 InstantAppsHandler.getInstance().cacheInstantAppsEnabled();
192 ChromeWebApkHost.cacheEnabledStateForNextLaunch(); 193 ChromeWebApkHost.cacheEnabledStateForNextLaunch();
193 cacheChromeHomeEnabled(); 194 cacheChromeHomeEnabled();
195 FirstRunGlueImpl.cacheFirstRunPrefs();
194 } 196 }
195 197
196 /** 198 /**
197 * Caches which flavor of Herb the user prefers from native. 199 * Caches which flavor of Herb the user prefers from native.
198 */ 200 */
199 private static void cacheHerbFlavor() { 201 private static void cacheHerbFlavor() {
200 Context context = ContextUtils.getApplicationContext(); 202 Context context = ContextUtils.getApplicationContext();
201 if (isHerbDisallowed(context)) return; 203 if (isHerbDisallowed(context)) return;
202 204
203 String oldFlavor = getHerbFlavor(); 205 String oldFlavor = getHerbFlavor();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 ChromePreferenceManager.getInstance(ContextUtils.getApplicat ionContext()); 268 ChromePreferenceManager.getInstance(ContextUtils.getApplicat ionContext());
267 sChromeHomeEnabled = manager.isChromeHomeEnabled(); 269 sChromeHomeEnabled = manager.isChromeHomeEnabled();
268 } 270 }
269 271
270 return sChromeHomeEnabled; 272 return sChromeHomeEnabled;
271 } 273 }
272 274
273 private static native void nativeSetCustomTabVisible(boolean visible); 275 private static native void nativeSetCustomTabVisible(boolean visible);
274 private static native void nativeSetIsInMultiWindowMode(boolean isInMultiWin dowMode); 276 private static native void nativeSetIsInMultiWindowMode(boolean isInMultiWin dowMode);
275 } 277 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunGlueImpl.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698