Bug 576343 - Make sure search provider loads are in a remote browser [r=mbrubeck]
authorMark Finkle <mfinkle@mozilla.com>
Fri, 02 Jul 2010 13:48:46 -0400
changeset 49682 a99f3ed429f2857b2fced2cc3b280f647edbd024
parent 49681 5753501b99547f0bcb05f0aa9575337cf3d43b83
child 49683 61d655fb8d7557e05414e35f3948e6d14e35b3be
push id15027
push useredward.lee@engineering.uiuc.edu
push dateThu, 12 Aug 2010 09:51:47 +0000
treeherderautoland@cdfff833edf9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs576343
Bug 576343 - Make sure search provider loads are in a remote browser [r=mbrubeck]
toolkit/content/Geometry.jsm
--- a/toolkit/content/Geometry.jsm
+++ b/toolkit/content/Geometry.jsm
@@ -133,16 +133,20 @@ let Util = {
     return gIOService.newURI(aURL, aOriginCharset, aBaseURI);
   },
 
   makeURLAbsolute: function makeURLAbsolute(base, url) {
     // Note:  makeURI() will throw if url is not a valid URI
     return this.makeURI(url, null, this.makeURI(base)).spec;
   },
 
+  isLocalScheme: function isLocalScheme(aURL) {
+    return (aURL.indexOf("about:") == 0 && aURL != "about:blank") || aURL.indexOf("chrome:") == 0;
+  },
+
   clamp: function(num, min, max) {
     return Math.max(min, Math.min(max, num));
   },
 
   /**
    * Determines whether a home page override is needed.
    * Returns:
    *  "new profile" if this is the first run with a new profile.