media/webrtc/trunk/build/android/adb_kill_content_shell

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rwxr-xr-x

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 #!/bin/bash
     2 #
     3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
     4 # Use of this source code is governed by a BSD-style license that can be
     5 # found in the LICENSE file.
     6 #
     7 # Kill a running content shell.
     8 #
     9 # Assumes you have sourced the build/android/envsetup.sh script.
    11 SHELL_PID_LINES=$(adb shell ps | grep ' org.chromium.content_shell')
    12 VAL=$(echo "$SHELL_PID_LINES" | wc -l)
    13 if [ $VAL -lt 1 ] ; then
    14    echo "Not running Content shell."
    15 else 
    16    SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}')
    17    if [ "$SHELL_PID" != "" ] ; then
    18       set -x
    19       adb shell kill $SHELL_PID
    20       set -
    21    else
    22      echo "Content shell does not appear to be running."
    23    fi
    24 fi

mercurial