Backed out 2 changesets (bug 1384753) for frequently failing toolkit/components/extensions/test/mochitest/test_chrome_ext_downloads_saveAs.html on Android. r=backout on a CLOSED TREE

Backed out changeset 2f0da700e651 (bug 1384753)
Backed out changeset 9801aade9511 (bug 1384753)

--HG--
rename : toolkit/components/reputationservice/ApplicationReputation.cpp => toolkit/components/downloads/ApplicationReputation.cpp
rename : toolkit/components/reputationservice/ApplicationReputation.h => toolkit/components/downloads/ApplicationReputation.h
rename : toolkit/components/reputationservice/chromium/LICENSE => toolkit/components/downloads/chromium/LICENSE
rename : toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.cc => toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.cc
rename : toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.h => toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.h
rename : toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.proto => toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.proto
rename : toolkit/components/reputationservice/nsIApplicationReputation.idl => toolkit/components/downloads/nsIApplicationReputation.idl
rename : toolkit/components/reputationservice/test/unit/.eslintrc.js => toolkit/components/downloads/test/unit/.eslintrc.js
rename : toolkit/components/reputationservice/test/unit/data/block_digest.chunk => toolkit/components/downloads/test/unit/data/block_digest.chunk
rename : toolkit/components/reputationservice/test/unit/data/digest.chunk => toolkit/components/downloads/test/unit/data/digest.chunk
rename : toolkit/components/reputationservice/test/unit/data/signed_win.exe => toolkit/components/downloads/test/unit/data/signed_win.exe
rename : toolkit/components/reputationservice/test/unit/head_download_manager.js => toolkit/components/downloads/test/unit/head_download_manager.js
rename : toolkit/components/reputationservice/test/unit/xpcshell.ini => toolkit/components/downloads/test/unit/xpcshell.ini
This commit is contained in:
Sebastian Hengst 2017-10-27 18:36:30 +02:00
Родитель a8f3618eb0
Коммит 0cd2b5d266
30 изменённых файлов: 41 добавлений и 158 удалений

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

@ -1111,12 +1111,6 @@ BrowserGlue.prototype = {
// early, so we use a maximum timeout for it.
Services.tm.idleDispatchToMainThread(() => {
SafeBrowsing.init();
// Login reputation depends on the Safe Browsing API.
if (Services.prefs.getBoolPref("browser.safebrowsing.passwords.enabled")) {
Cc["@mozilla.org/reputationservice/login-reputation-service;1"]
.getService(Ci.ILoginReputationService);
}
}, 5000);
if (AppConstants.MOZ_CRASHREPORTER) {

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

@ -294,7 +294,6 @@
@RESPATH@/components/profiler.xpt
#endif
@RESPATH@/components/rdf.xpt
@RESPATH@/components/reputationservice.xpt
@RESPATH@/components/satchel.xpt
@RESPATH@/components/saxparser.xpt
@RESPATH@/browser/components/sessionstore.xpt

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

@ -26,7 +26,6 @@ LOCAL_INCLUDES += [
'../jsdownloads/src',
'../perfmonitoring',
'../protobuf',
'../reputationservice',
'../startup',
'../statusfilter',
'../typeaheadfind',

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

@ -176,16 +176,10 @@
#endif
#define NS_APPLICATION_REPUTATION_SERVICE_CONTRACTID \
"@mozilla.org/reputationservice/application-reputation-service;1"
"@mozilla.org/downloads/application-reputation-service;1"
#define NS_APPLICATION_REPUTATION_SERVICE_CID \
{ 0xd21b4c33, 0x716f, 0x4117, { 0x80, 0x41, 0x27, 0x70, 0xb5, 0x9f, 0xf8, 0xa6 } }
#define NS_LOGIN_REPUTATION_SERVICE_CONTRACTID \
"@mozilla.org/reputationservice/login-reputation-service;1"
#define NS_LOGIN_REPUTATION_SERVICE_CID \
{ 0x91fa9e67, 0x1427, 0x4ee9, { 0x8e, 0xe0, 0x1a, 0x6e, 0xd5, 0x78, 0xbe, 0xe1 } }
{ 0x8576c950, 0xf4a2, 0x11e2, { 0xb7, 0x78, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 } }
#define NS_ADDONCONTENTPOLICY_CID \
{ 0xc26a8241, 0xecf4, 0x4aed, { 0x9f, 0x3c, 0xf1, 0xf5, 0xc7, 0x13, 0xb9, 0xa5 } }

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

@ -26,7 +26,6 @@
#include "nsTypeAheadFind.h"
#include "ApplicationReputation.h"
#include "LoginReputation.h"
#include "nsUrlClassifierDBService.h"
#include "nsUrlClassifierStreamUpdater.h"
#include "nsUrlClassifierUtils.h"
@ -92,8 +91,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsTypeAheadFind)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(ApplicationReputationService,
ApplicationReputationService::GetSingleton)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(LoginReputationService,
LoginReputationService::GetSingleton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUrlClassifierPrefixSet)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUrlClassifierStreamUpdater)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsUrlClassifierUtils, Init)
@ -149,7 +146,6 @@ NS_DEFINE_NAMED_CID(NS_DOWNLOADPLATFORM_CID);
NS_DEFINE_NAMED_CID(NS_FIND_SERVICE_CID);
NS_DEFINE_NAMED_CID(NS_TYPEAHEADFIND_CID);
NS_DEFINE_NAMED_CID(NS_APPLICATION_REPUTATION_SERVICE_CID);
NS_DEFINE_NAMED_CID(NS_LOGIN_REPUTATION_SERVICE_CID);
NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERPREFIXSET_CID);
NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERDBSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERSTREAMUPDATER_CID);
@ -185,7 +181,6 @@ static const Module::CIDEntry kToolkitCIDs[] = {
{ &kNS_FIND_SERVICE_CID, false, nullptr, nsFindServiceConstructor },
{ &kNS_TYPEAHEADFIND_CID, false, nullptr, nsTypeAheadFindConstructor },
{ &kNS_APPLICATION_REPUTATION_SERVICE_CID, false, nullptr, ApplicationReputationServiceConstructor },
{ &kNS_LOGIN_REPUTATION_SERVICE_CID, false, nullptr, LoginReputationServiceConstructor },
{ &kNS_URLCLASSIFIERPREFIXSET_CID, false, nullptr, nsUrlClassifierPrefixSetConstructor },
{ &kNS_URLCLASSIFIERDBSERVICE_CID, false, nullptr, nsUrlClassifierDBServiceConstructor },
{ &kNS_URLCLASSIFIERSTREAMUPDATER_CID, false, nullptr, nsUrlClassifierStreamUpdaterConstructor },
@ -223,7 +218,6 @@ static const Module::ContractIDEntry kToolkitContracts[] = {
{ NS_FIND_SERVICE_CONTRACTID, &kNS_FIND_SERVICE_CID },
{ NS_TYPEAHEADFIND_CONTRACTID, &kNS_TYPEAHEADFIND_CID },
{ NS_APPLICATION_REPUTATION_SERVICE_CONTRACTID, &kNS_APPLICATION_REPUTATION_SERVICE_CID },
{ NS_LOGIN_REPUTATION_SERVICE_CONTRACTID, &kNS_LOGIN_REPUTATION_SERVICE_CID },
{ NS_URLCLASSIFIERPREFIXSET_CONTRACTID, &kNS_URLCLASSIFIERPREFIXSET_CID },
{ NS_URLCLASSIFIERDBSERVICE_CONTRACTID, &kNS_URLCLASSIFIERDBSERVICE_CID },
{ NS_URICLASSIFIERSERVICE_CONTRACTID, &kNS_URLCLASSIFIERDBSERVICE_CID },

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

@ -20,7 +20,7 @@ if [ ! -e $PROTOC_PATH ]; then
fi
if [ ! -f nsIApplicationReputation.idl ]; then
echo "You must run this script in the toolkit/components/reputationservice" >&2
echo "You must run this script in the toolkit/components/downloads" >&2
echo "directory of the source tree." >&2
exit 1
fi

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

@ -7,7 +7,22 @@
with Files('*'):
BUG_COMPONENT = ('Toolkit', 'Download Manager')
with Files('ApplicationReputation.*'):
BUG_COMPONENT = ('Toolkit', 'Safe Browsing')
with Files('chromium/*'):
BUG_COMPONENT = ('Toolkit', 'Safe Browsing')
with Files('generate_csd.sh'):
BUG_COMPONENT = ('Toolkit', 'Safe Browsing')
with Files('nsIApplicationReputation.idl'):
BUG_COMPONENT = ('Toolkit', 'Safe Browsing')
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
XPIDL_SOURCES += [
'nsIApplicationReputation.idl',
'nsIDownload.idl',
'nsIDownloadManager.idl',
'nsIDownloadManagerUI.idl',
@ -17,9 +32,23 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'downloads'
UNIFIED_SOURCES += [
'ApplicationReputation.cpp',
'chromium/chrome/common/safe_browsing/csd.pb.cc',
'nsDownloadManager.cpp'
]
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'../protobuf',
'/ipc/chromium/src',
'chromium'
]
DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
CXXFLAGS += CONFIG['TK_CFLAGS']
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-shadow']

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

@ -9,8 +9,6 @@
#include "nsDirectoryServiceDefs.h"
#include "nsDownloadManager.h"
#include "mozilla/Services.h"
using namespace mozilla;
#define DOWNLOAD_MANAGER_BUNDLE "chrome://mozapps/locale/downloads/downloads.properties"

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

@ -7,7 +7,7 @@
Cu.import("resource://gre/modules/NetUtil.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
const gAppRep = Cc["@mozilla.org/reputationservice/application-reputation-service;1"].
const gAppRep = Cc["@mozilla.org/downloads/application-reputation-service;1"].
getService(Ci.nsIApplicationReputationService);
var gHttpServ = null;
var gTables = {};

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

@ -3,6 +3,11 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* This file tests signature extraction using Windows Authenticode APIs of
* downloaded files.
*/
// Globals
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
@ -10,7 +15,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm");
const gAppRep = Cc["@mozilla.org/reputationservice/application-reputation-service;1"].
const gAppRep = Cc["@mozilla.org/downloads/application-reputation-service;1"].
getService(Ci.nsIApplicationReputationService);
var gStillRunning = true;
var gTables = {};

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

@ -28,7 +28,7 @@ const StringInputStream = Components.Constructor(
const TEST_FILE_NAME_1 = "test-backgroundfilesaver-1.txt";
const gAppRep = Cc["@mozilla.org/reputationservice/application-reputation-service;1"].
const gAppRep = Cc["@mozilla.org/downloads/application-reputation-service;1"].
getService(Ci.nsIApplicationReputationService);
var gStillRunning = true;
var gTables = {};

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

@ -71,7 +71,7 @@ XPCOMUtils.defineLazyGetter(this, "gParentalControlsService", function() {
});
XPCOMUtils.defineLazyServiceGetter(this, "gApplicationReputationService",
"@mozilla.org/reputationservice/application-reputation-service;1",
"@mozilla.org/downloads/application-reputation-service;1",
Ci.nsIApplicationReputationService);
XPCOMUtils.defineLazyServiceGetter(this, "volumeService",

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

@ -53,7 +53,6 @@ DIRS += [
'reader',
'remotebrowserutils',
'reflect',
'reputationservice',
'resistfingerprinting',
'securityreporter',
'startup',

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

@ -1,17 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
[scriptable, uuid(b527be1e-8fbb-41d9-bee4-267a71236368)]
interface ILoginReputationQueryCallback : nsISupports {
void onQueryComplete();
};
[scriptable, uuid(1b3f1dfe-ce3a-486b-953e-ce5ac863eff9)]
interface ILoginReputationService : nsISupports {
// XXX : Add QueryReputation interface
};

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

@ -1,38 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "LoginReputation.h"
using namespace mozilla;
// MOZ_LOG=LoginReputation:5
LazyLogModule LoginReputationService::prlog("LoginReputation");
#define LR_LOG(args) MOZ_LOG(LoginReputationService::prlog, mozilla::LogLevel::Debug, args)
#define LR_LOG_ENABLED() MOZ_LOG_TEST(LoginReputationService::prlog, mozilla::LogLevel::Debug)
NS_IMPL_ISUPPORTS(LoginReputationService,
ILoginReputationService)
LoginReputationService*
LoginReputationService::gLoginReputationService = nullptr;
already_AddRefed<LoginReputationService>
LoginReputationService::GetSingleton()
{
if (!gLoginReputationService) {
gLoginReputationService = new LoginReputationService();
}
return do_AddRef(gLoginReputationService);
}
LoginReputationService::LoginReputationService()
{
LR_LOG(("Login reputation service starting up"));
}
LoginReputationService::~LoginReputationService()
{
LR_LOG(("Login reputation service shutting down"));
}

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

@ -1,36 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef LoginReputation_h__
#define LoginReputation_h__
#include "ILoginReputation.h"
#include "mozilla/Logging.h"
class LoginReputationService final : public ILoginReputationService
{
public:
NS_DECL_ISUPPORTS
NS_DECL_ILOGINREPUTATIONSERVICE
public:
static already_AddRefed<LoginReputationService> GetSingleton();
private:
/**
* Global singleton object for holding this factory service.
*/
static LoginReputationService* gLoginReputationService;
/**
* MOZ_LOG=LoginReputation:5
*/
static mozilla::LazyLogModule prlog;
LoginReputationService();
~LoginReputationService();
};
#endif // LoginReputation_h__

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

@ -1,37 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files('*'):
BUG_COMPONENT = ('Toolkit', 'Safe Browsing')
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
XPIDL_SOURCES += [
'ILoginReputation.idl',
'nsIApplicationReputation.idl',
]
XPIDL_MODULE = 'reputationservice'
UNIFIED_SOURCES += [
'ApplicationReputation.cpp',
'chromium/chrome/common/safe_browsing/csd.pb.cc',
'LoginReputation.cpp',
]
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'../protobuf',
'/ipc/chromium/src',
'chromium',
]
DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-shadow']