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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 918093002: Pipe v8CacheOptions for ServiceWorker from the browser process to blink [2/2 chromium] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 487
488 prefs.disable_reading_from_canvas = command_line.HasSwitch( 488 prefs.disable_reading_from_canvas = command_line.HasSwitch(
489 switches::kDisableReadingFromCanvas); 489 switches::kDisableReadingFromCanvas);
490 490
491 prefs.strict_mixed_content_checking = command_line.HasSwitch( 491 prefs.strict_mixed_content_checking = command_line.HasSwitch(
492 switches::kEnableStrictMixedContentChecking); 492 switches::kEnableStrictMixedContentChecking);
493 493
494 prefs.strict_powerful_feature_restrictions = command_line.HasSwitch( 494 prefs.strict_powerful_feature_restrictions = command_line.HasSwitch(
495 switches::kEnableStrictPowerfulFeatureRestrictions); 495 switches::kEnableStrictPowerfulFeatureRestrictions);
496 496
497 std::string v8_cache_options = 497 prefs.v8_cache_options = GetV8CacheOptions();
498 command_line.GetSwitchValueASCII(switches::kV8CacheOptions);
499 if (v8_cache_options.empty())
500 v8_cache_options = base::FieldTrialList::FindFullName("V8CacheOptions");
501 if (v8_cache_options == "parse") {
502 prefs.v8_cache_options = V8_CACHE_OPTIONS_PARSE;
503 } else if (v8_cache_options == "code") {
504 prefs.v8_cache_options = V8_CACHE_OPTIONS_CODE;
505 } else if (v8_cache_options == "code-compressed") {
506 prefs.v8_cache_options = V8_CACHE_OPTIONS_CODE_COMPRESSED;
507 } else if (v8_cache_options == "none") {
508 prefs.v8_cache_options = V8_CACHE_OPTIONS_NONE;
509 } else if (v8_cache_options == "parse-memory") {
510 prefs.v8_cache_options = V8_CACHE_OPTIONS_PARSE_MEMORY;
511 } else if (v8_cache_options == "heuristics") {
512 prefs.v8_cache_options = V8_CACHE_OPTIONS_HEURISTICS;
513 } else if (v8_cache_options == "heuristics-mobile") {
514 prefs.v8_cache_options = V8_CACHE_OPTIONS_HEURISTICS_MOBILE;
515 } else if (v8_cache_options == "heuristics-default") {
516 prefs.v8_cache_options = V8_CACHE_OPTIONS_HEURISTICS_DEFAULT;
517 } else if (v8_cache_options == "heuristics-default-mobile") {
518 prefs.v8_cache_options = V8_CACHE_OPTIONS_HEURISTICS_DEFAULT_MOBILE;
519 } else if (v8_cache_options == "recent") {
520 prefs.v8_cache_options = V8_CACHE_OPTIONS_RECENT;
521 } else if (v8_cache_options == "recent-small") {
522 prefs.v8_cache_options = V8_CACHE_OPTIONS_RECENT_SMALL;
523 } else {
524 prefs.v8_cache_options = V8_CACHE_OPTIONS_DEFAULT;
525 }
526 498
527 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs); 499 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs);
528 return prefs; 500 return prefs;
529 } 501 }
530 502
531 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() { 503 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() {
532 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID())); 504 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID()));
533 } 505 }
534 506
535 void RenderViewHostImpl::ClosePage() { 507 void RenderViewHostImpl::ClosePage() {
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 FrameTree* frame_tree = delegate_->GetFrameTree(); 1436 FrameTree* frame_tree = delegate_->GetFrameTree();
1465 1437
1466 frame_tree->ResetForMainFrameSwap(); 1438 frame_tree->ResetForMainFrameSwap();
1467 } 1439 }
1468 1440
1469 void RenderViewHostImpl::SelectWordAroundCaret() { 1441 void RenderViewHostImpl::SelectWordAroundCaret() {
1470 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1442 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1471 } 1443 }
1472 1444
1473 } // namespace content 1445 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/embedded_worker_instance.cc » ('j') | content/common/content_switches_internal.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698