summaryrefslogtreecommitdiffstats
path: root/chromium/tools
diff options
context:
space:
mode:
authorPrimiano Tucci <primiano@google.com>2013-05-07 13:20:14 +0100
committerPrimiano Tucci <primiano@google.com>2013-05-07 18:12:13 +0100
commit7962d3fa1b66ed25aba03a2d48f6c47528d7d95c (patch)
tree5c28583e2ccc640cc40d28690918738007bbb0f5 /chromium/tools
parent49ff1a6656a115852ee45955985f791429e23527 (diff)
downloadandroid_frameworks_webview-7962d3fa1b66ed25aba03a2d48f6c47528d7d95c.tar.gz
android_frameworks_webview-7962d3fa1b66ed25aba03a2d48f6c47528d7d95c.tar.bz2
android_frameworks_webview-7962d3fa1b66ed25aba03a2d48f6c47528d7d95c.zip
Switched WebView command line to use file instead of system property.
Removed the former |webview.chromium.flags| system property. Now WebView startup paths load the command line arguments from /data/local/tmp/webview-command-line (if the file exists). Adding also the webview_command_line script for getting/setting the file contents (like adb_content_shell_command_line). BUG:8357127 Change-Id: Ic8962d88e7d8895f04897fb34303abf8517fc560
Diffstat (limited to 'chromium/tools')
-rwxr-xr-xchromium/tools/webview_command_line32
1 files changed, 32 insertions, 0 deletions
diff --git a/chromium/tools/webview_command_line b/chromium/tools/webview_command_line
new file mode 100755
index 0000000..b9ae8dc
--- /dev/null
+++ b/chromium/tools/webview_command_line
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# Copyright (C) 2013 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+CMD_LINE_FILE=/data/local/tmp/webview-command-line
+
+if [ $# -eq 0 ] ; then
+ # If nothing specified, print the command line.
+ adb shell "cat $CMD_LINE_FILE 2>/dev/null"
+elif [ $# -eq 1 ] && [ "$1" = '' ] ; then
+ # If given an empty string, delete the command line.
+ set -x
+ adb shell rm $CMD_LINE_FILE >/dev/null
+else
+ # Else set it.
+ set -x
+ adb shell "echo '$*' > $CMD_LINE_FILE"
+ # Prevent other apps from modifying flags -- this can create security issues.
+ adb shell chmod 0664 $CMD_LINE_FILE
+fi