Bug 1296472 - Move upstream chromium code into chromium directory. r=gcp

MozReview-Commit-ID: 3bjPtqtQlGb

--HG--
rename : toolkit/components/downloads/csd.pb.cc => toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.cc
rename : toolkit/components/downloads/csd.pb.h => toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.h
rename : toolkit/components/downloads/csd.proto => toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.proto
extra : rebase_source : 91c7bad5c13e3c67047807707658de31a69597cb
This commit is contained in:
Francois Marier 2016-08-18 15:50:09 -07:00
Родитель 0a08b11eb3
Коммит d1deb425bf
7 изменённых файлов: 40 добавлений и 13 удалений

Просмотреть файл

@ -7,7 +7,7 @@
// https://wiki.mozilla.org/Security/Features/Application_Reputation_Design_Doc
// for a description of Chrome's implementation of this feature.
#include "ApplicationReputation.h"
#include "csd.pb.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "nsIArray.h"
#include "nsIApplicationReputation.h"

Просмотреть файл

@ -0,0 +1,27 @@
// Copyright 2015 The Chromium Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Просмотреть файл

@ -1,11 +1,9 @@
#!/usr/bin/env bash
# A script to generate toolkit/components/downloads/csd.pb.{cc,h} for use in
# nsIApplicationReputationQuery. This script assumes you have downloaded and
# installed the protocol buffer compiler.
# As of June 26 2014, csd.proto contains many protobufs that are currently
# unused by ApplicationReputation. You may want to strip csd.proto of these
# before running the protocol compiler on it.
# A script to generate
# chromium/chrome/common/safe_browsing/csd.pb.{cc,h} for use in
# nsIApplicationReputationQuery. This script assumes you have
# downloaded and installed the protocol buffer compiler.
set -e
@ -17,7 +15,7 @@ echo "Using $PROTOC_PATH as protocol compiler"
if [ ! -e $PROTOC_PATH ]; then
echo "You must install the protocol compiler from " \
"https://code.google.com/p/protobuf/downloads/list"
"https://github.com/google/protobuf/releases"
exit 1
fi
@ -28,7 +26,8 @@ if [ ! -f nsDownloadManager.cpp ]; then
fi
# Get the protocol buffer and compile it
CSD_PROTO_URL="https://chromium.googlesource.com/playground/chromium-blink-merge/+/master/chrome/common/safe_browsing/csd.proto?format=TEXT"
CSD_PROTO_URL="https://chromium.googlesource.com/chromium/src/+/master/chrome/common/safe_browsing/csd.proto?format=TEXT"
CSD_PATH="chromium/chrome/common/safe_browsing"
curl $CSD_PROTO_URL | base64 --decode > csd.proto
$PROTOC_PATH csd.proto --cpp_out=.
curl "$CSD_PROTO_URL" | base64 --decode > "$CSD_PATH"/csd.proto
"$PROTOC_PATH" "$CSD_PATH"/csd.proto --cpp_out=.

Просмотреть файл

@ -43,7 +43,7 @@ SOURCES += [
if CONFIG['MOZ_URL_CLASSIFIER']:
UNIFIED_SOURCES += [
'ApplicationReputation.cpp',
'csd.pb.cc'
'chromium/chrome/common/safe_browsing/csd.pb.cc'
]
if CONFIG['OS_ARCH'] == 'WINNT':
@ -65,7 +65,8 @@ FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'../protobuf',
'/ipc/chromium/src'
'/ipc/chromium/src',
'chromium'
]
DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True