Index: chrome/common/extensions/manifest_handlers/content_scripts_handler.cc |
diff --git a/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc b/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc |
index 5ca9f9af2275696e7e7645248e846b1358daefa4..6cb936b6bb4b0ac4fe13da97696e1c2fadad3b36 100644 |
--- a/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc |
+++ b/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc |
@@ -31,6 +31,9 @@ namespace errors = manifest_errors; |
namespace { |
+// The globally-unique id for a user script. |
+int64 g_next_user_script_id = 0; |
+ |
// Helper method that loads either the include_globs or exclude_globs list |
// from an entry in the content_script lists of the manifest. |
bool LoadGlobsHelper(const base::DictionaryValue* content_script, |
@@ -424,6 +427,7 @@ bool ContentScriptsHandler::Parse(Extension* extension, base::string16* error) { |
// Greasemonkey matches all frames. |
user_script.set_match_all_frames(true); |
} |
+ user_script.set_id(g_next_user_script_id++); |
content_scripts_info->content_scripts.push_back(user_script); |
} |
extension->SetManifestData(keys::kContentScripts, |