summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/user_script_master.cc
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 19:14:45 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 19:14:45 +0000
commit1ed5cd0117990de7a4bd439d8295263b275725b8 (patch)
tree55559a4a465b5fcc21c8c068583949458796612f /chrome/browser/extensions/user_script_master.cc
parent70daf0b18defd88e97f5f9ebcc9486c22898b66b (diff)
downloadchromium_src-1ed5cd0117990de7a4bd439d8295263b275725b8.zip
chromium_src-1ed5cd0117990de7a4bd439d8295263b275725b8.tar.gz
chromium_src-1ed5cd0117990de7a4bd439d8295263b275725b8.tar.bz2
Further tweaks to incognito extensions.
- Add a warning to the incognito new tab page that your extensions are disabled in that mode. - Toggling an extension in incognito will reload the extension, fixing a bug where browser actions in existing incognito windows would not get updated. BUG=36292 BUG=32365 TEST=run chrome with --enable-experimental-extension-apis and some extensions loaded, and open an incognito window. Enable some extensions in incognito and make sure things work. Review URL: http://codereview.chromium.org/660220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/user_script_master.cc')
-rw-r--r--chrome/browser/extensions/user_script_master.cc19
1 files changed, 0 insertions, 19 deletions
diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc
index 9506efd..db84280 100644
--- a/chrome/browser/extensions/user_script_master.cc
+++ b/chrome/browser/extensions/user_script_master.cc
@@ -294,8 +294,6 @@ UserScriptMaster::UserScriptMaster(const FilePath& script_dir, Profile* profile)
Source<Profile>(profile_));
registrar_.Add(this, NotificationType::EXTENSION_LOADED,
Source<Profile>(profile_));
- registrar_.Add(this, NotificationType::EXTENSION_INCOGNITO_CHANGED,
- Source<Profile>(profile_));
registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
Source<Profile>(profile_));
}
@@ -350,23 +348,6 @@ void UserScriptMaster::Observe(NotificationType type,
StartScan();
break;
}
- case NotificationType::EXTENSION_INCOGNITO_CHANGED: {
- // Toggle the incognito_enabled bit for any content scripts inside the
- // extension.
- Extension* extension =
- Details<std::pair<Extension*, bool> >(details).ptr()->first;
- bool incognito_enabled =
- Details<std::pair<Extension*, bool> >(details).ptr()->second;
- for (UserScriptList::iterator iter = lone_scripts_.begin();
- iter != lone_scripts_.end(); ++iter) {
- if (iter->extension_id() == extension->id())
- (*iter).set_incognito_enabled(incognito_enabled);
- }
- if (extensions_service_ready_)
- StartScan();
- break;
- }
-
case NotificationType::EXTENSION_UNLOADED: {
// Remove any content scripts.
Extension* extension = Details<Extension>(details).ptr();