Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Refactor 'History enabled' checking code to clarify the expected bool…
Browse files Browse the repository at this point in the history
…ean result
  • Loading branch information
jaredhirsch committed Jan 24, 2018
1 parent c8b1747 commit bc7b20a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function handleMessage(msg, sender, sendReply) {
sendReply({type: "success", value: !!addon});
});
return true;
} else if (msg.funcName === "getHistoryPref") {
} else if (msg.funcName === "isHistoryEnabled") {
let historyEnabled = getBoolPref(HISTORY_ENABLED_PREF);
sendReply({type: "success", value: historyEnabled});
} else if (msg.funcName === "incrementCount") {
Expand Down
2 changes: 1 addition & 1 deletion addon/webextension/background/selectorLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ this.selectorLoader = (function() {
// TODO: since bootstrap communication is now required, would this function
// make more sense inside background/main?
function downloadOnlyCheck(tabId) {
return communication.sendToBootstrap("getHistoryPref").then((historyEnabled) => {
return communication.sendToBootstrap("isHistoryEnabled").then((historyEnabled) => {
return communication.sendToBootstrap("isUploadDisabled").then((uploadDisabled) => {
return browser.tabs.get(tabId).then(tab => {
let downloadOnly = !historyEnabled || uploadDisabled || tab.incognito;
Expand Down

0 comments on commit bc7b20a

Please sign in to comment.