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

Unified Diff: content/public/android/java/src/org/chromium/content/common/ContentSwitches.java

Issue 1622743005: Introduce background Download process to android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gn build 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
Index: content/public/android/java/src/org/chromium/content/common/ContentSwitches.java
diff --git a/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java b/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java
index 8fc8302513eec6206d3a2064eca42b7f991be414..899d48f072ced99e76a03463830e5941a44f99fe 100644
--- a/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java
+++ b/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java
@@ -72,6 +72,35 @@ public abstract class ContentSwitches {
// Native switch kIPCSyncCompositing
public static final String IPC_SYNC_COMPOSITING = "ipc-sync-compositing";
+ // Native switch kProcessType
+ public static final String SWITCH_PROCESS_TYPE = "type";
+
+ // Native switch kRendererProcess
+ public static final String SWITCH_RENDERER_PROCESS = "renderer";
+
+ // Native switch kUtilityProcess
+ public static final String SWITCH_UTILITY_PROCESS = "utility";
+
+ // Native switch kGPUProcess
+ public static final String SWITCH_GPU_PROCESS = "gpu-process";
+
+ // Native switch kDownloadProcess
+ public static final String SWITCH_DOWNLOAD_PROCESS = "download";
+
// Prevent instantiation.
private ContentSwitches() {}
+
+ public static String getSwitchValue(final String[] commandLine, String switchKey) {
+ if (commandLine == null || switchKey == null) {
+ return null;
+ }
+ // This format should be matched with the one defined in command_line.h.
+ final String switchKeyPrefix = "--" + switchKey + "=";
+ for (String command : commandLine) {
+ if (command != null && command.startsWith(switchKeyPrefix)) {
+ return command.substring(switchKeyPrefix.length());
+ }
+ }
+ return null;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698