Bug 1383909 - Add observer notification when UserAgentOverrides.jsm finishes initializing. r?mcmanus draft
authorDennis Schubert <dschubert@mozilla.com>
Mon, 24 Jul 2017 23:25:51 +0200
changeset 614645 ec0e824f46f2085179b860babd0e724003b09b3a
parent 614544 462d7561089c98e33382384896434861ad7bc491
child 638925 9a1832b2788e819db4de19b838422e695889e761
push id70080
push userdschubert@mozilla.com
push dateMon, 24 Jul 2017 21:27:10 +0000
reviewersmcmanus
bugs1383909
milestone56.0a1
Bug 1383909 - Add observer notification when UserAgentOverrides.jsm finishes initializing. r?mcmanus MozReview-Commit-ID: BPMzszXmhbC
netwerk/protocol/http/UserAgentOverrides.jsm
--- a/netwerk/protocol/http/UserAgentOverrides.jsm
+++ b/netwerk/protocol/http/UserAgentOverrides.jsm
@@ -62,16 +62,17 @@ this.UserAgentOverrides = {
       });
 
       buildOverrides();
     } catch (e) {
       // UserAgentOverrides is initialized before profile is ready.
       // UA override might not work correctly.
     }
 
+    Services.obs.notifyObservers(null, "useragentoverrides-initialized");
     gInitialized = true;
   },
 
   addComplexOverride: function uao_addComplexOverride(callback) {
     // Add to front of array so complex overrides have precedence
     gOverrideFunctions.unshift(callback);
   },