Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

Commit

Permalink
Don't only check state for HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
chengsun committed Apr 12, 2012
1 parent 5ba7fac commit ce2aeb8
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions chrome/content/indicator.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,17 @@ SPDYIndicator.prototype = {

update: function () {
let state = 0;
if (this.browser.currentURI.scheme === "https") {
// page has loaded to the state where we can retrieve the URI
let spdyRequests = this.browser.selectedBrowser.getUserData("__spdyindicator_spdyrequests");
if (!spdyRequests) {
state = 1;
let spdyRequests = this.browser.selectedBrowser.getUserData("__spdyindicator_spdyrequests");
if (!spdyRequests) {
state = 1;
} else {
if (this.browser.currentURI.prePath in spdyRequests) {
state = 3;
} else {
if (this.browser.currentURI.prePath in spdyRequests) {
state = 3;
} else {
state = 2;
}
state = 2;
}
}

// change indicator state
let indicator = this.window.document.getElementById("spdyindicator-icon");
let indicatorState = SPDYManager.indicatorStates[state];
Expand Down

0 comments on commit ce2aeb8

Please sign in to comment.