Index: chrome/common/extensions/user_script.cc |
diff --git a/chrome/common/extensions/user_script.cc b/chrome/common/extensions/user_script.cc |
index c726ad3bddd3d32e999981e5e372fc454eccb450..9a0da2d382a8e5ea60ac5eed48302f05dd13b528 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)); |