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

Unified Diff: lib/uninstall.js

Issue 29333533: Issue 3515 - Replace Prefs.onLoaded event by Prefs.isLoaded promise (Closed)
Patch Set: Created Jan. 14, 2016, 5:29 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/prefs.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/uninstall.js
===================================================================
--- a/lib/uninstall.js
+++ b/lib/uninstall.js
@@ -36,18 +36,12 @@
search.join("&"));
}
-function onPrefsLoaded()
-{
- Prefs.onLoaded.removeListener(onPrefsLoaded);
- setUninstallURL();
-}
-
// The uninstall URL contains the notification download count as a parameter,
// therefore we must wait for preferences to be loaded before generating the
// URL and we need to re-generate it each time the notification data changes.
if ("setUninstallURL" in chrome.runtime)
{
- Prefs.onLoaded.addListener(onPrefsLoaded);
+ Prefs.isLoaded.then(setUninstallURL);
Prefs.onChanged.addListener(function(name)
{
if (name == "notificationdata")
« no previous file with comments | « lib/prefs.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld