From 0cd2b5d26688a2467e95c6fc30d97a55eb1f93e1 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Fri, 27 Oct 2017 18:36:30 +0200 Subject: [PATCH] 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 --- browser/components/nsBrowserGlue.js | 6 --- browser/installer/package-manifest.in | 1 - toolkit/components/build/moz.build | 1 - toolkit/components/build/nsToolkitCompsCID.h | 10 +---- .../components/build/nsToolkitCompsModule.cpp | 6 --- .../ApplicationReputation.cpp | 0 .../ApplicationReputation.h | 0 .../chromium/LICENSE | 0 .../chrome/common/safe_browsing/csd.pb.cc | 0 .../chrome/common/safe_browsing/csd.pb.h | 0 .../chrome/common/safe_browsing/csd.proto | 0 .../generate_csd.sh | 2 +- toolkit/components/downloads/moz.build | 29 +++++++++++++ .../downloads/nsDownloadManager.cpp | 2 - .../nsIApplicationReputation.idl | 0 .../test/unit/.eslintrc.js | 0 .../test/unit/data/block_digest.chunk | 0 .../test/unit/data/digest.chunk | 0 .../test/unit/data/signed_win.exe | Bin .../test/unit/head_download_manager.js | 0 .../test/unit/test_app_rep.js | 2 +- .../test/unit/test_app_rep_maclinux.js | 7 +++- .../test/unit/test_app_rep_windows.js | 2 +- .../test/unit/xpcshell.ini | 0 .../jsdownloads/src/DownloadIntegration.jsm | 2 +- toolkit/components/moz.build | 1 - .../reputationservice/ILoginReputation.idl | 17 -------- .../reputationservice/LoginReputation.cpp | 38 ------------------ .../reputationservice/LoginReputation.h | 36 ----------------- .../components/reputationservice/moz.build | 37 ----------------- 30 files changed, 41 insertions(+), 158 deletions(-) rename toolkit/components/{reputationservice => downloads}/ApplicationReputation.cpp (100%) rename toolkit/components/{reputationservice => downloads}/ApplicationReputation.h (100%) rename toolkit/components/{reputationservice => downloads}/chromium/LICENSE (100%) rename toolkit/components/{reputationservice => downloads}/chromium/chrome/common/safe_browsing/csd.pb.cc (100%) rename toolkit/components/{reputationservice => downloads}/chromium/chrome/common/safe_browsing/csd.pb.h (100%) rename toolkit/components/{reputationservice => downloads}/chromium/chrome/common/safe_browsing/csd.proto (100%) rename toolkit/components/{reputationservice => downloads}/generate_csd.sh (91%) mode change 100755 => 100644 rename toolkit/components/{reputationservice => downloads}/nsIApplicationReputation.idl (100%) rename toolkit/components/{reputationservice => downloads}/test/unit/.eslintrc.js (100%) rename toolkit/components/{reputationservice => downloads}/test/unit/data/block_digest.chunk (100%) rename toolkit/components/{reputationservice => downloads}/test/unit/data/digest.chunk (100%) rename toolkit/components/{reputationservice => downloads}/test/unit/data/signed_win.exe (100%) rename toolkit/components/{reputationservice => downloads}/test/unit/head_download_manager.js (100%) rename toolkit/components/{reputationservice => downloads}/test/unit/test_app_rep.js (99%) rename toolkit/components/{reputationservice => downloads}/test/unit/test_app_rep_maclinux.js (98%) rename toolkit/components/{reputationservice => downloads}/test/unit/test_app_rep_windows.js (99%) rename toolkit/components/{reputationservice => downloads}/test/unit/xpcshell.ini (100%) delete mode 100644 toolkit/components/reputationservice/ILoginReputation.idl delete mode 100644 toolkit/components/reputationservice/LoginReputation.cpp delete mode 100644 toolkit/components/reputationservice/LoginReputation.h delete mode 100644 toolkit/components/reputationservice/moz.build diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index a2ff2528be52..b52e91b079df 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -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) { diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 0d69e5920455..a415ac1bb007 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -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 diff --git a/toolkit/components/build/moz.build b/toolkit/components/build/moz.build index d4737254db54..2ed10980bc28 100644 --- a/toolkit/components/build/moz.build +++ b/toolkit/components/build/moz.build @@ -26,7 +26,6 @@ LOCAL_INCLUDES += [ '../jsdownloads/src', '../perfmonitoring', '../protobuf', - '../reputationservice', '../startup', '../statusfilter', '../typeaheadfind', diff --git a/toolkit/components/build/nsToolkitCompsCID.h b/toolkit/components/build/nsToolkitCompsCID.h index 6dd7e17ec90a..bac82f0e866a 100644 --- a/toolkit/components/build/nsToolkitCompsCID.h +++ b/toolkit/components/build/nsToolkitCompsCID.h @@ -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 } } diff --git a/toolkit/components/build/nsToolkitCompsModule.cpp b/toolkit/components/build/nsToolkitCompsModule.cpp index cc28fc5d83d4..675afc4a5590 100644 --- a/toolkit/components/build/nsToolkitCompsModule.cpp +++ b/toolkit/components/build/nsToolkitCompsModule.cpp @@ -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 }, diff --git a/toolkit/components/reputationservice/ApplicationReputation.cpp b/toolkit/components/downloads/ApplicationReputation.cpp similarity index 100% rename from toolkit/components/reputationservice/ApplicationReputation.cpp rename to toolkit/components/downloads/ApplicationReputation.cpp diff --git a/toolkit/components/reputationservice/ApplicationReputation.h b/toolkit/components/downloads/ApplicationReputation.h similarity index 100% rename from toolkit/components/reputationservice/ApplicationReputation.h rename to toolkit/components/downloads/ApplicationReputation.h diff --git a/toolkit/components/reputationservice/chromium/LICENSE b/toolkit/components/downloads/chromium/LICENSE similarity index 100% rename from toolkit/components/reputationservice/chromium/LICENSE rename to toolkit/components/downloads/chromium/LICENSE diff --git a/toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.cc b/toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.cc similarity index 100% rename from toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.cc rename to toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.cc diff --git a/toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.h b/toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.h similarity index 100% rename from toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.h rename to toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.h diff --git a/toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.proto b/toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.proto similarity index 100% rename from toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.proto rename to toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.proto diff --git a/toolkit/components/reputationservice/generate_csd.sh b/toolkit/components/downloads/generate_csd.sh old mode 100755 new mode 100644 similarity index 91% rename from toolkit/components/reputationservice/generate_csd.sh rename to toolkit/components/downloads/generate_csd.sh index d8da51b50d01..908e88d6bbb8 --- a/toolkit/components/reputationservice/generate_csd.sh +++ b/toolkit/components/downloads/generate_csd.sh @@ -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 diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build index d4773f3d275d..1621564c24cf 100644 --- a/toolkit/components/downloads/moz.build +++ b/toolkit/components/downloads/moz.build @@ -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'] diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp index 6a9fce0794d3..e711ac7e2ebb 100644 --- a/toolkit/components/downloads/nsDownloadManager.cpp +++ b/toolkit/components/downloads/nsDownloadManager.cpp @@ -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" diff --git a/toolkit/components/reputationservice/nsIApplicationReputation.idl b/toolkit/components/downloads/nsIApplicationReputation.idl similarity index 100% rename from toolkit/components/reputationservice/nsIApplicationReputation.idl rename to toolkit/components/downloads/nsIApplicationReputation.idl diff --git a/toolkit/components/reputationservice/test/unit/.eslintrc.js b/toolkit/components/downloads/test/unit/.eslintrc.js similarity index 100% rename from toolkit/components/reputationservice/test/unit/.eslintrc.js rename to toolkit/components/downloads/test/unit/.eslintrc.js diff --git a/toolkit/components/reputationservice/test/unit/data/block_digest.chunk b/toolkit/components/downloads/test/unit/data/block_digest.chunk similarity index 100% rename from toolkit/components/reputationservice/test/unit/data/block_digest.chunk rename to toolkit/components/downloads/test/unit/data/block_digest.chunk diff --git a/toolkit/components/reputationservice/test/unit/data/digest.chunk b/toolkit/components/downloads/test/unit/data/digest.chunk similarity index 100% rename from toolkit/components/reputationservice/test/unit/data/digest.chunk rename to toolkit/components/downloads/test/unit/data/digest.chunk diff --git a/toolkit/components/reputationservice/test/unit/data/signed_win.exe b/toolkit/components/downloads/test/unit/data/signed_win.exe similarity index 100% rename from toolkit/components/reputationservice/test/unit/data/signed_win.exe rename to toolkit/components/downloads/test/unit/data/signed_win.exe diff --git a/toolkit/components/reputationservice/test/unit/head_download_manager.js b/toolkit/components/downloads/test/unit/head_download_manager.js similarity index 100% rename from toolkit/components/reputationservice/test/unit/head_download_manager.js rename to toolkit/components/downloads/test/unit/head_download_manager.js diff --git a/toolkit/components/reputationservice/test/unit/test_app_rep.js b/toolkit/components/downloads/test/unit/test_app_rep.js similarity index 99% rename from toolkit/components/reputationservice/test/unit/test_app_rep.js rename to toolkit/components/downloads/test/unit/test_app_rep.js index 3f3fe1e79cac..2d99ed24eda7 100644 --- a/toolkit/components/reputationservice/test/unit/test_app_rep.js +++ b/toolkit/components/downloads/test/unit/test_app_rep.js @@ -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 = {}; diff --git a/toolkit/components/reputationservice/test/unit/test_app_rep_maclinux.js b/toolkit/components/downloads/test/unit/test_app_rep_maclinux.js similarity index 98% rename from toolkit/components/reputationservice/test/unit/test_app_rep_maclinux.js rename to toolkit/components/downloads/test/unit/test_app_rep_maclinux.js index 33ad1a4c2dd6..24644340ae56 100644 --- a/toolkit/components/reputationservice/test/unit/test_app_rep_maclinux.js +++ b/toolkit/components/downloads/test/unit/test_app_rep_maclinux.js @@ -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 = {}; diff --git a/toolkit/components/reputationservice/test/unit/test_app_rep_windows.js b/toolkit/components/downloads/test/unit/test_app_rep_windows.js similarity index 99% rename from toolkit/components/reputationservice/test/unit/test_app_rep_windows.js rename to toolkit/components/downloads/test/unit/test_app_rep_windows.js index f69d03022d28..903207e7d6b7 100644 --- a/toolkit/components/reputationservice/test/unit/test_app_rep_windows.js +++ b/toolkit/components/downloads/test/unit/test_app_rep_windows.js @@ -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 = {}; diff --git a/toolkit/components/reputationservice/test/unit/xpcshell.ini b/toolkit/components/downloads/test/unit/xpcshell.ini similarity index 100% rename from toolkit/components/reputationservice/test/unit/xpcshell.ini rename to toolkit/components/downloads/test/unit/xpcshell.ini diff --git a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm index e0a566914b0d..8369ec87580c 100644 --- a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm +++ b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm @@ -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", diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build index d8dc6b80ef6d..8466ec2e40d7 100644 --- a/toolkit/components/moz.build +++ b/toolkit/components/moz.build @@ -53,7 +53,6 @@ DIRS += [ 'reader', 'remotebrowserutils', 'reflect', - 'reputationservice', 'resistfingerprinting', 'securityreporter', 'startup', diff --git a/toolkit/components/reputationservice/ILoginReputation.idl b/toolkit/components/reputationservice/ILoginReputation.idl deleted file mode 100644 index ded4948d3e4b..000000000000 --- a/toolkit/components/reputationservice/ILoginReputation.idl +++ /dev/null @@ -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 -}; diff --git a/toolkit/components/reputationservice/LoginReputation.cpp b/toolkit/components/reputationservice/LoginReputation.cpp deleted file mode 100644 index 163934502ef8..000000000000 --- a/toolkit/components/reputationservice/LoginReputation.cpp +++ /dev/null @@ -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::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")); -} diff --git a/toolkit/components/reputationservice/LoginReputation.h b/toolkit/components/reputationservice/LoginReputation.h deleted file mode 100644 index 76a80139d7e5..000000000000 --- a/toolkit/components/reputationservice/LoginReputation.h +++ /dev/null @@ -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 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__ diff --git a/toolkit/components/reputationservice/moz.build b/toolkit/components/reputationservice/moz.build deleted file mode 100644 index c8dd45a47c2c..000000000000 --- a/toolkit/components/reputationservice/moz.build +++ /dev/null @@ -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']