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

Unified Diff: extensions/common/user_script.h

Issue 495853002: Atomic UserScript ID generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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: extensions/common/user_script.h
diff --git a/extensions/common/user_script.h b/extensions/common/user_script.h
index bfa23dd50096f60b6aa1066ca79ccea3d93abc9d..5a37d3be7053bff5de5f382506ac7217b478024a 100644
--- a/extensions/common/user_script.h
+++ b/extensions/common/user_script.h
@@ -27,6 +27,8 @@ class UserScript {
// The file extension for standalone user scripts.
static const char kFileExtension[];
+ static int GenerateUserScriptID();
+
// Check if a URL should be treated as a user script and converted to an
// extension.
static bool IsURLUserScript(const GURL& url, const std::string& mime_type);
@@ -193,8 +195,8 @@ class UserScript {
const std::string& extension_id() const { return extension_id_; }
void set_extension_id(const std::string& id) { extension_id_ = id; }
- int64 id() const { return user_script_id_; }
- void set_id(int64 id) { user_script_id_ = id; }
+ int id() const { return user_script_id_; }
+ void set_id(int id) { user_script_id_ = id; }
bool is_incognito_enabled() const { return incognito_enabled_; }
void set_incognito_enabled(bool enabled) { incognito_enabled_ = enabled; }
@@ -269,7 +271,7 @@ class UserScript {
// The globally-unique id associated with this user script. Defaults to
// -1 for invalid.
- int64 user_script_id_;
+ int user_script_id_;
// Whether we should try to emulate Greasemonkey's APIs when running this
// script.
« no previous file with comments | « chrome/common/extensions/manifest_handlers/content_scripts_manifest_unittest.cc ('k') | extensions/common/user_script.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698