Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/utils.js

Issue 5852091641757696: Noissue - Remove unused isFennec property (Closed)
Patch Set: Created May 12, 2015, 9:06 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 30 matching lines...) Expand all
41 /** 41 /**
42 * Returns the installed Adblock Plus version 42 * Returns the installed Adblock Plus version
43 */ 43 */
44 get addonVersion() 44 get addonVersion()
45 { 45 {
46 let {addonVersion} = require("info"); 46 let {addonVersion} = require("info");
47 return addonVersion; 47 return addonVersion;
48 }, 48 },
49 49
50 /** 50 /**
51 * Returns whether we are running in Fennec, for Fennec-specific hacks
52 * @type Boolean
53 */
54 get isFennec()
55 {
56 let {application} = require("info");
57 let result = (application == "fennec" || application == "fennec2");
58 Object.defineProperty(this, "isFennec", {value: result});
59 return result;
60 },
61
62 /**
63 * Returns the user interface locale selected for adblockplus chrome package. 51 * Returns the user interface locale selected for adblockplus chrome package.
64 */ 52 */
65 get appLocale() 53 get appLocale()
66 { 54 {
67 let locale = "en-US"; 55 let locale = "en-US";
68 try 56 try
69 { 57 {
70 locale = Utils.chromeRegistry.getSelectedLocale("adblockplus"); 58 locale = Utils.chromeRegistry.getSelectedLocale("adblockplus");
71 } 59 }
72 catch (e) 60 catch (e)
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 Cu.reportError(e); 768 Cu.reportError(e);
781 // Expected, ctypes isn't supported in Gecko 1.9.2 769 // Expected, ctypes isn't supported in Gecko 1.9.2
782 return null; 770 return null;
783 } 771 }
784 }); 772 });
785 773
786 if ("@mozilla.org/messenger/headerparser;1" in Cc) 774 if ("@mozilla.org/messenger/headerparser;1" in Cc)
787 XPCOMUtils.defineLazyServiceGetter(Utils, "headerParser", "@mozilla.org/messen ger/headerparser;1", "nsIMsgHeaderParser"); 775 XPCOMUtils.defineLazyServiceGetter(Utils, "headerParser", "@mozilla.org/messen ger/headerparser;1", "nsIMsgHeaderParser");
788 else 776 else
789 Utils.headerParser = null; 777 Utils.headerParser = null;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld