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

Unified Diff: chrome/browser/extensions/script_executor.cc

Issue 22875046: Don't serialize extension user script injection results unless the extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
Index: chrome/browser/extensions/script_executor.cc
diff --git a/chrome/browser/extensions/script_executor.cc b/chrome/browser/extensions/script_executor.cc
index 9e4aecdcc2cf660a1757262ab5ae9494cfddcb04..41ffd49eaaf0142583d8bb6ca47d449c50f8409a 100644
--- a/chrome/browser/extensions/script_executor.cc
+++ b/chrome/browser/extensions/script_executor.cc
@@ -115,7 +115,8 @@ void ScriptExecutor::ExecuteScript(
ScriptExecutor::FrameScope frame_scope,
UserScript::RunLocation run_at,
ScriptExecutor::WorldType world_type,
- bool is_web_view,
+ ScriptExecutor::ProcessType process_type,
+ ScriptExecutor::ResultType result_type,
const ExecuteScriptCallback& callback) {
ExtensionMsg_ExecuteCode_Params params;
params.request_id = next_request_id_++;
@@ -125,7 +126,8 @@ void ScriptExecutor::ExecuteScript(
params.all_frames = (frame_scope == ALL_FRAMES);
params.run_at = static_cast<int>(run_at);
params.in_main_world = (world_type == MAIN_WORLD);
- params.is_web_view = is_web_view;
+ params.is_web_view = (process_type == WEB_VIEW_PROCESS);
+ params.wants_result = (result_type == JSON_SERIALIZED_RESULT);
// Handler handles IPCs and deletes itself on completion.
new Handler(script_observers_, web_contents_, params, callback);

Powered by Google App Engine
This is Rietveld 408576698