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

Unified Diff: chrome/common/extensions/user_script.cc

Issue 567037: Initial work on making extensions work in incognito mode. (Closed)
Patch Set: added experimental requirement Created 10 years, 10 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
« no previous file with comments | « chrome/common/extensions/user_script.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/user_script.cc
diff --git a/chrome/common/extensions/user_script.cc b/chrome/common/extensions/user_script.cc
index 7a48c1465df01112e1485e85745af4ea9c0cc40a..5ed204052487e5b24c9229b7ff39b0d611e2f471 100644
--- a/chrome/common/extensions/user_script.cc
+++ b/chrome/common/extensions/user_script.cc
@@ -75,17 +75,12 @@ void UserScript::File::Unpickle(const ::Pickle& pickle, void** iter) {
}
void UserScript::Pickle(::Pickle* pickle) const {
- // Write the run location.
+ // Write simple types.
pickle->WriteInt(run_location());
-
- // Write the extension id.
pickle->WriteString(extension_id());
-
- // Write Greasemonkey emulation.
pickle->WriteBool(emulate_greasemonkey());
-
- // Write match all frames
pickle->WriteBool(match_all_frames());
+ pickle->WriteBool(is_incognito_enabled());
// Write globs.
std::vector<std::string>::const_iterator glob;
@@ -127,14 +122,10 @@ void UserScript::Unpickle(const ::Pickle& pickle, void** iter) {
CHECK(run_location >= 0 && run_location < RUN_LOCATION_LAST);
run_location_ = static_cast<RunLocation>(run_location);
- // Read the extension ID.
CHECK(pickle.ReadString(iter, &extension_id_));
-
- // Read Greasemonkey emulation.
CHECK(pickle.ReadBool(iter, &emulate_greasemonkey_));
-
- // Read match all frames
CHECK(pickle.ReadBool(iter, &match_all_frames_));
+ CHECK(pickle.ReadBool(iter, &incognito_enabled_));
// Read globs.
size_t num_globs = 0;
« no previous file with comments | « chrome/common/extensions/user_script.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698