toolkit/components/downloads/generate_csd.sh

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 # A script to generate toolkit/components/downloads/csd.pb.{cc,h} for use in
     3 # nsIApplicationReputationQuery. This script assumes you have downloaded and
     4 # installed the protocol buffer compiler.
     6 if [ -n $PROTOC_PATH ]; then
     7   PROTOC_PATH=/usr/local/bin/protoc
     8 fi
    10 echo "Using $PROTOC_PATH as protocol compiler"
    12 if [ ! -e $PROTOC_PATH ]; then
    13   echo "You must install the protocol compiler from " \
    14        "https://code.google.com/p/protobuf/downloads/list"
    15   exit 1
    16 fi
    18 # Get the protocol buffer and compile it
    19 CMD='wget http://src.chromium.org/chrome/trunk/src/chrome/common/safe_browsing/csd.proto -O csd.proto'
    20 OUTPUT_PATH=toolkit/components/downloads
    22 $CMD
    23 $PROTOC_PATH csd.proto --cpp_out=$OUTPUT_PATH

mercurial