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

Side by Side Diff: background.js

Issue 8681105: Show a warning to people having a corrupted file storage (Closed)
Patch Set: Created Oct. 30, 2012, 10:28 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 | « _locales/en_US/messages.json ('k') | firstRun.html » ('j') | 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 21 matching lines...) Expand all
32 var defaultMatcher = require("matcher").defaultMatcher; 32 var defaultMatcher = require("matcher").defaultMatcher;
33 var Prefs = require("prefs").Prefs; 33 var Prefs = require("prefs").Prefs;
34 var Synchronizer = require("synchronizer").Synchronizer; 34 var Synchronizer = require("synchronizer").Synchronizer;
35 var Utils = require("utils").Utils; 35 var Utils = require("utils").Utils;
36 36
37 // Some types cannot be distinguished 37 // Some types cannot be distinguished
38 RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT; 38 RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT;
39 RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OT HER; 39 RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OT HER;
40 40
41 var isFirstRun = false; 41 var isFirstRun = false;
42 var seenDataCorruption = false;
42 require("filterNotifier").FilterNotifier.addListener(function(action) 43 require("filterNotifier").FilterNotifier.addListener(function(action)
43 { 44 {
44 if (action == "load") 45 if (action == "load")
45 { 46 {
46 importOldData(); 47 importOldData();
47 48
48 var addonVersion = require("info").addonVersion; 49 var addonVersion = require("info").addonVersion;
49 var prevVersion = localStorage["currentVersion"]; 50 var prevVersion = localStorage["currentVersion"];
50 if (prevVersion != addonVersion) 51 if (prevVersion != addonVersion)
51 { 52 {
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 refreshIconAndContextMenu(windows[i].tabs[j]); 561 refreshIconAndContextMenu(windows[i].tabs[j]);
561 }); 562 });
562 563
563 // Update icon if a tab changes location 564 // Update icon if a tab changes location
564 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) 565 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab)
565 { 566 {
566 chrome.tabs.sendRequest(tabId, {reqtype: "clickhide-deactivate"}) 567 chrome.tabs.sendRequest(tabId, {reqtype: "clickhide-deactivate"})
567 if(changeInfo.status == "loading") 568 if(changeInfo.status == "loading")
568 refreshIconAndContextMenu(tab); 569 refreshIconAndContextMenu(tab);
569 }); 570 });
OLDNEW
« no previous file with comments | « _locales/en_US/messages.json ('k') | firstRun.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld