Bug 1394601 - Log an error when the Google API key is missing during Safe Browsing initialization. r=gcp
authorFrancois Marier <francois@mozilla.com>
Mon, 28 Aug 2017 17:06:00 -0700
changeset 377623 f1acaf27810c348b8dc00c866d51e748e9e0a447
parent 377622 951cfc00293a1e0e3817c71e533cc10a190a0188
child 377624 dd814ec7af065e4764ec6c65d46c0b977292ff42
push id32412
push userarchaeopteryx@coole-files.de
push dateWed, 30 Aug 2017 08:45:09 +0000
treeherdermozilla-central@ae9e6b6d3132 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgcp
bugs1394601
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1394601 - Log an error when the Google API key is missing during Safe Browsing initialization. r=gcp MozReview-Commit-ID: DNwa9lR0J6K
toolkit/components/url-classifier/SafeBrowsing.jsm
--- a/toolkit/components/url-classifier/SafeBrowsing.jsm
+++ b/toolkit/components/url-classifier/SafeBrowsing.jsm
@@ -300,16 +300,17 @@ this.SafeBrowsing = {
         "browser.safebrowsing.provider." + provider + ".gethashURL");
       updateURL = updateURL.replace("SAFEBROWSING_ID", clientID);
       gethashURL = gethashURL.replace("SAFEBROWSING_ID", clientID);
 
       // Disable updates and gethash if the Google API key is missing.
       let googleKey = Services.urlFormatter.formatURL("%GOOGLE_API_KEY%").trim();
       if ((provider == "google" || provider == "google4") &&
           (!googleKey || googleKey == "no-google-api-key")) {
+        log("Missing Google API key, clearing updateURL and gethashURL.");
         updateURL = "";
         gethashURL = "";
       }
 
       log("Provider: " + provider + " updateURL=" + updateURL);
       log("Provider: " + provider + " gethashURL=" + gethashURL);
 
       // Urls used to update DB