Chromium Code Reviews| Index: extensions/common/user_script.h |
| diff --git a/extensions/common/user_script.h b/extensions/common/user_script.h |
| index 5a2731536b2237699a1c76f54aa778d2af9643e8..ec1fdaacd59093f504e59c9bd1722f45a5ea2324 100644 |
| --- a/extensions/common/user_script.h |
| +++ b/extensions/common/user_script.h |
| @@ -11,6 +11,7 @@ |
| #include "base/basictypes.h" |
| #include "base/files/file_path.h" |
| #include "base/strings/string_piece.h" |
| +#include "extensions/common/consumer.h" |
| #include "extensions/common/url_pattern.h" |
| #include "extensions/common/url_pattern_set.h" |
| #include "url/gurl.h" |
| @@ -197,6 +198,11 @@ class UserScript { |
| const std::string& extension_id() const { return extension_id_; } |
| void set_extension_id(const std::string& id) { extension_id_ = id; } |
|
Fady Samuel
2015/01/06 13:55:11
Can this be removed?
Xi Han
2015/01/07 18:57:06
Removed.
|
| + const ConsumerID& consumer_id() const { return consumer_id_; } |
| + void set_consumer_id(const ConsumerID& consumer_id) { |
| + consumer_id_ = consumer_id; |
| + } |
| + |
| int id() const { return user_script_id_; } |
| void set_id(int id) { user_script_id_ = id; } |
| @@ -222,6 +228,7 @@ class UserScript { |
| // Pickle helper functions used to pickle the individual types of components. |
| void PickleGlobs(::Pickle* pickle, |
| const std::vector<std::string>& globs) const; |
| + void PickleConsumerID(::Pickle* pickle, const ConsumerID& consumer_id) const; |
| void PickleURLPatternSet(::Pickle* pickle, |
| const URLPatternSet& pattern_list) const; |
| void PickleScripts(::Pickle* pickle, const FileList& scripts) const; |
| @@ -229,6 +236,9 @@ class UserScript { |
| // Unpickle helper functions used to unpickle individual types of components. |
| void UnpickleGlobs(const ::Pickle& pickle, PickleIterator* iter, |
| std::vector<std::string>* globs); |
| + void UnpickleConsumerID(const ::Pickle& pickle, |
| + PickleIterator* iter, |
| + ConsumerID* consumer_id); |
| void UnpickleURLPatternSet(const ::Pickle& pickle, PickleIterator* iter, |
| URLPatternSet* pattern_list); |
| void UnpickleScripts(const ::Pickle& pickle, PickleIterator* iter, |
| @@ -271,6 +281,9 @@ class UserScript { |
| // the script is a "standlone" user script. |
| std::string extension_id_; |
|
Fady Samuel
2015/01/06 13:55:11
Can this be removed?
Xi Han
2015/01/07 18:57:06
Removed.
|
| + // The ID of the consumer this script is a part of. |
| + ConsumerID consumer_id_; |
| + |
| // The globally-unique id associated with this user script. Defaults to |
| // -1 for invalid. |
| int user_script_id_; |