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

Side by Side Diff: lib/adblockplus_compat.js

Issue 8681104: Fixed: First-run page opens twice on a new install (Closed)
Patch Set: Created Oct. 30, 2012, 9:24 a.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 the Adblock Plus extension, 2 * This file is part of the Adblock Plus extension,
3 * Copyright (C) 2006-2012 Eyeo GmbH 3 * Copyright (C) 2006-2012 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return new FakeFile(path); 147 return new FakeFile(path);
148 }, 148 },
149 149
150 readFromFile: function(file, decode, listener, callback, timeLineID) 150 readFromFile: function(file, decode, listener, callback, timeLineID)
151 { 151 {
152 if ("spec" in file && /^defaults\b/.test(file.spec)) 152 if ("spec" in file && /^defaults\b/.test(file.spec))
153 { 153 {
154 // Code attempts to read the default patterns.ini, we don't have that. 154 // Code attempts to read the default patterns.ini, we don't have that.
155 // Make sure to execute first-run actions instead. 155 // Make sure to execute first-run actions instead.
156 callback(null); 156 callback(null);
157 addSubscription("0.1"); 157 delete localStorage.currentVersion;
158 require("filterNotifier").FilterNotifier.triggerListeners("load");
158 return; 159 return;
159 } 160 }
160 161
161 this._getFileEntry(file, false, function(fs, fileEntry) 162 this._getFileEntry(file, false, function(fs, fileEntry)
162 { 163 {
163 fileEntry.file(function(file) 164 fileEntry.file(function(file)
164 { 165 {
165 var reader = new FileReader(); 166 var reader = new FileReader();
166 reader.onloadend = function() 167 reader.onloadend = function()
167 { 168 {
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 status: -1, 591 status: -1,
591 notificationCallbacks: {}, 592 notificationCallbacks: {},
592 loadFlags: 0, 593 loadFlags: 0,
593 INHIBIT_CACHING: 0, 594 INHIBIT_CACHING: 0,
594 VALIDATE_ALWAYS: 0, 595 VALIDATE_ALWAYS: 0,
595 QueryInterface: function() 596 QueryInterface: function()
596 { 597 {
597 return this; 598 return this;
598 } 599 }
599 }; 600 };
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