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 377577 f1acaf27810c348b8dc00c866d51e748e9e0a447
parent 377576 951cfc00293a1e0e3817c71e533cc10a190a0188
child 377578 dd814ec7af065e4764ec6c65d46c0b977292ff42
push id49941
push userfmarier@mozilla.com
push dateTue, 29 Aug 2017 19:47:46 +0000
treeherderautoland@f1acaf27810c [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