Merge lp:~cando/zeitgeist-datasources/ff-private-browsing into lp:zeitgeist-datasources/0.8

Proposed by Stefano Candori
Status: Merged
Merged at revision: 114
Proposed branch: lp:~cando/zeitgeist-datasources/ff-private-browsing
Merge into: lp:zeitgeist-datasources/0.8
Diff against target: 21 lines (+4/-0)
1 file modified
firefox-libzg/extension/chrome/content/zeitgeist.xul (+4/-0)
To merge this branch: bzr merge lp:~cando/zeitgeist-datasources/ff-private-browsing
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Review via email: mp+47430@code.launchpad.net

Description of the change

In this branch i've hopefully fixed the issue with private browsing in firefox...now when we surf in private mode the dataprovider doesn't send events to the daemon.

To post a comment you must log in.
115. By Stefano Candori

Quick fix

Revision history for this message
Michal Hruby (mhr3) wrote :

Great, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'firefox-libzg/extension/chrome/content/zeitgeist.xul'
--- firefox-libzg/extension/chrome/content/zeitgeist.xul 2010-05-20 18:33:46 +0000
+++ firefox-libzg/extension/chrome/content/zeitgeist.xul 2011-01-25 18:29:14 +0000
@@ -6,6 +6,8 @@
66
7 var enable_googlemail = false;7 var enable_googlemail = false;
8 var googlemail_view_regex = new RegExp("mail\\.google\\.com");8 var googlemail_view_regex = new RegExp("mail\\.google\\.com");
9 var pbs = Components.classes["@mozilla.org/privatebrowsing;1"]
10 .getService(Components.interfaces.nsIPrivateBrowsingService);
911
10 var debug = function (aMessage) {12 var debug = function (aMessage) {
11 var consoleService = Components.classes["@mozilla.org/consoleservice;1"]13 var consoleService = Components.classes["@mozilla.org/consoleservice;1"]
@@ -109,6 +111,8 @@
109 111
110 var ZeitgeistProgressListener = {112 var ZeitgeistProgressListener = {
111 onStateChange: function(aBrowser, aProgress, aRequest, aStateFlags) {113 onStateChange: function(aBrowser, aProgress, aRequest, aStateFlags) {
114 var inPrivateBrowsingMode = pbs.privateBrowsingEnabled;
115 if (inPrivateBrowsingMode) return;
112 if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) {116 if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) {
113 var uri = aBrowser.currentURI.spec;117 var uri = aBrowser.currentURI.spec;
114 var mimetype = aBrowser.contentDocument.contentType;118 var mimetype = aBrowser.contentDocument.contentType;

Subscribers

People subscribed via source and target branches