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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 697673002: Script streaming: Add more Finch experiments for streaming policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops Created 6 years, 1 month 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 | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index f09be50cc455cfccd7b1edc9764228c44469c2f2..24b49e0a107afb8112cbf0d4f8e7308ac74a29ae 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -473,9 +473,22 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs(const GURL& url) {
}
}
+ std::string streaming_experiment_group =
+ base::FieldTrialList::FindFullName("V8ScriptStreaming");
prefs.v8_script_streaming_enabled =
- command_line.HasSwitch(switches::kEnableV8ScriptStreaming) ||
- base::FieldTrialList::FindFullName("V8ScriptStreaming") == "Enabled";
+ command_line.HasSwitch(switches::kEnableV8ScriptStreaming);
+ if (streaming_experiment_group == "Enabled") {
+ prefs.v8_script_streaming_enabled = true;
+ prefs.v8_script_streaming_mode = V8_SCRIPT_STREAMING_MODE_ALL;
+ } else if (streaming_experiment_group == "OnlyAsyncAndDefer") {
+ prefs.v8_script_streaming_enabled = true;
+ prefs.v8_script_streaming_mode =
+ V8_SCRIPT_STREAMING_MODE_ONLY_ASYNC_AND_DEFER;
+ } else if (streaming_experiment_group == "AllPlusBlockParserBlocking") {
+ prefs.v8_script_streaming_enabled = true;
+ prefs.v8_script_streaming_mode =
+ V8_SCRIPT_STREAMING_MODE_ALL_PLUS_BLOCK_PARSER_BLOCKING;
+ }
GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs);
return prefs;
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698