diff options
Diffstat (limited to 'chrome/common/extensions/user_script.cc')
-rw-r--r-- | chrome/common/extensions/user_script.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/common/extensions/user_script.cc b/chrome/common/extensions/user_script.cc index c726ad3..9a0da2d 100644 --- a/chrome/common/extensions/user_script.cc +++ b/chrome/common/extensions/user_script.cc @@ -24,6 +24,7 @@ bool UserScript::MatchesUrl(const GURL& url) { void UserScript::Pickle(::Pickle* pickle) { pickle->WriteString(url_.spec()); + pickle->WriteInt(run_location_); // Don't write path as we don't need that in the renderer. @@ -45,6 +46,11 @@ void UserScript::Unpickle(const ::Pickle& pickle, void** iter) { CHECK(pickle.ReadString(iter, &url_spec)); url_ = GURL(url_spec); + int run_location = 0; + CHECK(pickle.ReadInt(iter, &run_location)); + CHECK(run_location >= 0 && run_location < UserScript::RUN_LOCATION_LAST); + run_location_ = static_cast<UserScript::RunLocation>(run_location); + size_t num_globs = 0; CHECK(pickle.ReadSize(iter, &num_globs)); |