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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 command_line.GetSwitchValueASCII(switches::kV8CacheOptions); 466 command_line.GetSwitchValueASCII(switches::kV8CacheOptions);
467 if (v8_cache_options == "parse") { 467 if (v8_cache_options == "parse") {
468 prefs.v8_cache_options = V8_CACHE_OPTIONS_PARSE; 468 prefs.v8_cache_options = V8_CACHE_OPTIONS_PARSE;
469 } else if (v8_cache_options == "code") { 469 } else if (v8_cache_options == "code") {
470 prefs.v8_cache_options = V8_CACHE_OPTIONS_CODE; 470 prefs.v8_cache_options = V8_CACHE_OPTIONS_CODE;
471 } else { 471 } else {
472 prefs.v8_cache_options = V8_CACHE_OPTIONS_OFF; 472 prefs.v8_cache_options = V8_CACHE_OPTIONS_OFF;
473 } 473 }
474 } 474 }
475 475
476 std::string streaming_experiment_group =
477 base::FieldTrialList::FindFullName("V8ScriptStreaming");
476 prefs.v8_script_streaming_enabled = 478 prefs.v8_script_streaming_enabled =
477 command_line.HasSwitch(switches::kEnableV8ScriptStreaming) || 479 command_line.HasSwitch(switches::kEnableV8ScriptStreaming);
478 base::FieldTrialList::FindFullName("V8ScriptStreaming") == "Enabled"; 480 if (streaming_experiment_group == "Enabled") {
481 prefs.v8_script_streaming_enabled = true;
Mike West 2014/10/31 14:42:43 This means that you're going to override the comma
marja 2014/10/31 14:47:48 Yes. People should get this enabled if 1) they got
482 prefs.v8_script_streaming_mode = V8_SCRIPT_STREAMING_MODE_ALL;
483 }
jochen (gone - plz use gerrit) 2014/11/03 09:09:29 else if {
marja 2014/11/03 09:13:33 Done.
484 if (streaming_experiment_group == "OnlyAsyncAndDefer") {
485 prefs.v8_script_streaming_enabled = true;
486 prefs.v8_script_streaming_mode =
487 V8_SCRIPT_STREAMING_MODE_ONLY_ASYNC_AND_DEFER;
488 }
489 if (streaming_experiment_group == "AllPlusBlockParserBlocking") {
490 prefs.v8_script_streaming_enabled = true;
491 prefs.v8_script_streaming_mode =
492 V8_SCRIPT_STREAMING_MODE_ALL_PLUS_BLOCK_PARSER_BLOCKING;
493 }
479 494
480 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs); 495 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs);
481 return prefs; 496 return prefs;
482 } 497 }
483 498
484 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() { 499 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() {
485 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID())); 500 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID()));
486 } 501 }
487 502
488 void RenderViewHostImpl::ClosePage() { 503 void RenderViewHostImpl::ClosePage() {
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 FrameTree* frame_tree = delegate_->GetFrameTree(); 1441 FrameTree* frame_tree = delegate_->GetFrameTree();
1427 1442
1428 frame_tree->ResetForMainFrameSwap(); 1443 frame_tree->ResetForMainFrameSwap();
1429 } 1444 }
1430 1445
1431 void RenderViewHostImpl::SelectWordAroundCaret() { 1446 void RenderViewHostImpl::SelectWordAroundCaret() {
1432 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1447 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1433 } 1448 }
1434 1449
1435 } // namespace content 1450 } // namespace content
OLDNEW
« 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