Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(758)

Unified Diff: chrome/browser/extensions/user_script_master.h

Issue 288053002: Block content scripts from executing until user grants permission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CQ Time! Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/user_script_master.h
diff --git a/chrome/browser/extensions/user_script_master.h b/chrome/browser/extensions/user_script_master.h
index 7a56efa810af522f1c7d6cee40deb09e61d1a8a4..13eb6fc01b9a00af08d84870d2b1f62c21e291f0 100644
--- a/chrome/browser/extensions/user_script_master.h
+++ b/chrome/browser/extensions/user_script_master.h
@@ -149,9 +149,13 @@ class UserScriptMaster : public base::RefCountedThreadSafe<UserScriptMaster>,
const Extension* extension,
UnloadedExtensionInfo::Reason reason) OVERRIDE;
- // Sends the renderer process a new set of user scripts.
+ // Sends the renderer process a new set of user scripts. If
+ // |changed_extensions| is not empty, this signals that only the scripts from
+ // those extensions should be updated. Otherwise, all extensions will be
+ // updated.
void SendUpdate(content::RenderProcessHost* process,
- base::SharedMemory* shared_memory);
+ base::SharedMemory* shared_memory,
+ const std::set<std::string>& changed_extensions);
// Manages our notification registrations.
content::NotificationRegistrar registrar_;
@@ -168,6 +172,10 @@ class UserScriptMaster : public base::RefCountedThreadSafe<UserScriptMaster>,
// Maps extension info needed for localization to an extension ID.
ExtensionsInfo extensions_info_;
+ // The IDs of the extensions which have changed since the last update sent to
+ // the renderer.
+ std::set<std::string> changed_extensions_;
+
// If the extensions service has finished loading its initial set of
// extensions.
bool extensions_service_ready_;
« no previous file with comments | « chrome/browser/extensions/active_script_controller_browsertest.cc ('k') | chrome/browser/extensions/user_script_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698