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

Unified Diff: content/renderer/render_view_impl.cc

Issue 1192323002: Cleanup: Remove experimental V8 cache strategies that we discarded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better comments. Created 5 years, 6 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: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index f40945ce1aba39cb8bb9731a578a6eae3b0abd24..71b03f5bbf490f754dee4e62a0e90dc43f2d3daa 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1064,8 +1064,29 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
settings->setSelectionIncludesAltImageText(true);
+// This change has both Chrome + blink components. The #if-guard allows us
+// to do this in two steps.
+#ifdef CLEANUP_V8_CACHE_OPTIONS_GUARD
+ // Proper solution:
settings->setV8CacheOptions(
static_cast<WebSettings::V8CacheOptions>(prefs.v8_cache_options));
+#else
+ // Temporary solution, while not all changes are in:
+ switch (prefs.v8_cache_options) {
+ case V8_CACHE_OPTIONS_DEFAULT:
+ settings->setV8CacheOptions(WebSettings::V8CacheOptionsDefault);
+ break;
+ case V8_CACHE_OPTIONS_NONE:
+ settings->setV8CacheOptions(WebSettings::V8CacheOptionsNone);
+ break;
+ case V8_CACHE_OPTIONS_PARSE:
+ settings->setV8CacheOptions(WebSettings::V8CacheOptionsParseMemory);
+ break;
+ case V8_CACHE_OPTIONS_CODE:
+ settings->setV8CacheOptions(WebSettings::V8CacheOptionsHeuristics);
+ break;
+ }
+#endif // CLEANUP_V8_CACHE_OPTIONS_GUARD
settings->setImageAnimationPolicy(
static_cast<WebSettings::ImageAnimationPolicy>(prefs.animation_policy));
« no previous file with comments | « content/public/common/web_preferences.cc ('k') | content/renderer/service_worker/embedded_worker_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698