summaryrefslogtreecommitdiffstats
path: root/extensions/common/user_script.cc
diff options
context:
space:
mode:
authorcpu <cpu@chromium.org>2015-03-02 16:50:36 -0800
committerCommit bot <commit-bot@chromium.org>2015-03-03 00:51:31 +0000
commit9244b35bbc6b0907e70ca0e62d7ac063d7ef86e9 (patch)
treebf5994c7ad9647ebc92ad7c960931cc2fe6c67d1 /extensions/common/user_script.cc
parent60492b548ef6897223b22233a7fd28c05c71322c (diff)
downloadchromium_src-9244b35bbc6b0907e70ca0e62d7ac063d7ef86e9.zip
chromium_src-9244b35bbc6b0907e70ca0e62d7ac063d7ef86e9.tar.gz
chromium_src-9244b35bbc6b0907e70ca0e62d7ac063d7ef86e9.tar.bz2
Revert of Refactoring: de-couple Extensions from "script injection System" [render side]:2 (patchset #8 id:350001 of https://codereview.chromium.org/906493004/)
Reason for revert: broke the extension tests: http://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%29%281%29%2832%29/builds/10543 Original issue's description: > This CL adds routing info for content scripts from <webview>. > > To support dynamically added/removed content scripts in <webview>, we store > these content scripts in the same shared memory where user scripts from > declarative content API are stored, but the decision for injection will > be made in the render once the url pattern is matched. Since render doesn't > need to send IPCs to ask a decision from browser, it makes a precise time > injection possible. > > Special to <webview>, once the content scripts are updated (added/removed), > browser will only notify the render process of the given <webview>, rather than > all of the renders (which is the case for user scripts). > > BUG=437566 > > Committed: https://crrev.com/f853287c95cf818d0b5b02d7f4a6588761096d1c > Cr-Commit-Position: refs/heads/master@{#318774} TBR=rdevlin.cronin@chromium.org,fsamuel@chromium.org,hanxi@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=437566 Review URL: https://codereview.chromium.org/972863002 Cr-Commit-Position: refs/heads/master@{#318810}
Diffstat (limited to 'extensions/common/user_script.cc')
-rw-r--r--extensions/common/user_script.cc22
1 files changed, 0 insertions, 22 deletions
diff --git a/extensions/common/user_script.cc b/extensions/common/user_script.cc
index 7859e75..b8ba22e 100644
--- a/extensions/common/user_script.cc
+++ b/extensions/common/user_script.cc
@@ -145,8 +145,6 @@ void UserScript::Pickle(::Pickle* pickle) const {
pickle->WriteBool(is_incognito_enabled());
PickleHostID(pickle, host_id_);
- pickle->WriteInt(consumer_instance_type());
- PickleRoutingInfo(pickle, routing_info_);
PickleGlobs(pickle, globs_);
PickleGlobs(pickle, exclude_globs_);
PickleURLPatternSet(pickle, url_set_);
@@ -169,12 +167,6 @@ void UserScript::PickleHostID(::Pickle* pickle, const HostID& host_id) const {
pickle->WriteString(host_id.id());
}
-void UserScript::PickleRoutingInfo(::Pickle* pickle,
- const RoutingInfo& routing_info) const {
- pickle->WriteInt(routing_info.render_process_id);
- pickle->WriteInt(routing_info.render_view_id);
-}
-
void UserScript::PickleURLPatternSet(::Pickle* pickle,
const URLPatternSet& pattern_list) const {
pickle->WriteSizeT(pattern_list.patterns().size());
@@ -208,13 +200,6 @@ void UserScript::Unpickle(const ::Pickle& pickle, PickleIterator* iter) {
CHECK(iter->ReadBool(&incognito_enabled_));
UnpickleHostID(pickle, iter, &host_id_);
-
- int consumer_instance_type = 0;
- CHECK(iter->ReadInt(&consumer_instance_type));
- consumer_instance_type_ =
- static_cast<ConsumerInstanceType>(consumer_instance_type);
-
- UnpickleRoutingInfo(pickle, iter, &routing_info_);
UnpickleGlobs(pickle, iter, &globs_);
UnpickleGlobs(pickle, iter, &exclude_globs_);
UnpickleURLPatternSet(pickle, iter, &url_set_);
@@ -245,13 +230,6 @@ void UserScript::UnpickleHostID(const ::Pickle& pickle,
*host_id = HostID(static_cast<HostID::HostType>(type), id);
}
-void UserScript::UnpickleRoutingInfo(const ::Pickle& pickle,
- PickleIterator* iter,
- RoutingInfo* routing_info) {
- CHECK(iter->ReadInt(&routing_info->render_process_id));
- CHECK(iter->ReadInt(&routing_info->render_view_id));
-}
-
void UserScript::UnpickleURLPatternSet(const ::Pickle& pickle,
PickleIterator* iter,
URLPatternSet* pattern_list) {