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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java

Issue 1658723007: Prototype handling of Intents in Custom Tabs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rearranged Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
index 4b12c62147959447a43bc558850e985ad77e00ad..f4c0743ba4560df80c208fc24b1c8ffaaa6d7096 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
@@ -65,6 +65,7 @@ import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomiza
import org.chromium.chrome.browser.physicalweb.PhysicalWebBleClient;
import org.chromium.chrome.browser.policy.PolicyAuditor;
import org.chromium.chrome.browser.preferences.AccessibilityPreferences;
+import org.chromium.chrome.browser.preferences.ChromePreferenceManager;
import org.chromium.chrome.browser.preferences.LocationSettings;
import org.chromium.chrome.browser.preferences.PrefServiceBridge;
import org.chromium.chrome.browser.preferences.Preferences;
@@ -124,6 +125,7 @@ public class ChromeApplication extends ContentApplication {
private static final String DEV_TOOLS_SERVER_SOCKET_PREFIX = "chrome";
private static final String SESSIONS_UUID_PREF_KEY = "chromium.sync.sessions.id";
+ private static boolean sIsFinishedCachingNativeFlags;
private static DocumentTabModelSelector sDocumentTabModelSelector;
/**
@@ -248,6 +250,7 @@ public class ChromeApplication extends ContentApplication {
assert mIsProcessInitialized;
onForegroundSessionStart();
+ cacheNativeFlags();
}
/**
@@ -849,4 +852,16 @@ public class ChromeApplication extends ContentApplication {
PrefServiceBridge.getInstance().setPasswordEchoEnabled(systemEnabled);
}
+
+ /**
+ * Caches flags that are needed by Activities that launch before the native library is loaded
+ * and stores them in SharedPreferences. Because this function is called during launch after the
+ * library has loaded, they won't affect the next launch until Chrome is restarted.
gone 2016/02/02 01:59:42 Ted: I didn't make this function cause a reboot be
Ted C 2016/02/02 21:22:46 We might want to put a temporary toast in here tel
+ */
+ private void cacheNativeFlags() {
+ if (sIsFinishedCachingNativeFlags) return;
+
+ ChromePreferenceManager.getInstance(this).cacheHerbFlavor();
+ sIsFinishedCachingNativeFlags = true;
+ }
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698