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

Side by Side 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 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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); 1057 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled);
1058 settings->setMainFrameResizesAreOrientationChanges( 1058 settings->setMainFrameResizesAreOrientationChanges(
1059 prefs.main_frame_resizes_are_orientation_changes); 1059 prefs.main_frame_resizes_are_orientation_changes);
1060 1060
1061 settings->setSmartInsertDeleteEnabled(prefs.smart_insert_delete_enabled); 1061 settings->setSmartInsertDeleteEnabled(prefs.smart_insert_delete_enabled);
1062 1062
1063 settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled); 1063 settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled);
1064 1064
1065 settings->setSelectionIncludesAltImageText(true); 1065 settings->setSelectionIncludesAltImageText(true);
1066 1066
1067 // This change has both Chrome + blink components. The #if-guard allows us
1068 // to do this in two steps.
1069 #ifdef CLEANUP_V8_CACHE_OPTIONS_GUARD
1070 // Proper solution:
1067 settings->setV8CacheOptions( 1071 settings->setV8CacheOptions(
1068 static_cast<WebSettings::V8CacheOptions>(prefs.v8_cache_options)); 1072 static_cast<WebSettings::V8CacheOptions>(prefs.v8_cache_options));
1073 #else
1074 // Temporary solution, while not all changes are in:
1075 switch (prefs.v8_cache_options) {
1076 case V8_CACHE_OPTIONS_DEFAULT:
1077 settings->setV8CacheOptions(WebSettings::V8CacheOptionsDefault);
1078 break;
1079 case V8_CACHE_OPTIONS_NONE:
1080 settings->setV8CacheOptions(WebSettings::V8CacheOptionsNone);
1081 break;
1082 case V8_CACHE_OPTIONS_PARSE:
1083 settings->setV8CacheOptions(WebSettings::V8CacheOptionsParseMemory);
1084 break;
1085 case V8_CACHE_OPTIONS_CODE:
1086 settings->setV8CacheOptions(WebSettings::V8CacheOptionsHeuristics);
1087 break;
1088 }
1089 #endif // CLEANUP_V8_CACHE_OPTIONS_GUARD
1069 1090
1070 settings->setImageAnimationPolicy( 1091 settings->setImageAnimationPolicy(
1071 static_cast<WebSettings::ImageAnimationPolicy>(prefs.animation_policy)); 1092 static_cast<WebSettings::ImageAnimationPolicy>(prefs.animation_policy));
1072 1093
1073 // Needs to happen before setIgnoreVIewportTagScaleLimits below. 1094 // Needs to happen before setIgnoreVIewportTagScaleLimits below.
1074 web_view->setDefaultPageScaleLimits( 1095 web_view->setDefaultPageScaleLimits(
1075 prefs.default_minimum_page_scale_factor, 1096 prefs.default_minimum_page_scale_factor,
1076 prefs.default_maximum_page_scale_factor); 1097 prefs.default_maximum_page_scale_factor);
1077 1098
1078 #if defined(OS_ANDROID) 1099 #if defined(OS_ANDROID)
(...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after
3778 std::vector<gfx::Size> sizes; 3799 std::vector<gfx::Size> sizes;
3779 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3800 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3780 if (!url.isEmpty()) 3801 if (!url.isEmpty())
3781 urls.push_back( 3802 urls.push_back(
3782 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3803 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3783 } 3804 }
3784 SendUpdateFaviconURL(urls); 3805 SendUpdateFaviconURL(urls);
3785 } 3806 }
3786 3807
3787 } // namespace content 3808 } // namespace content
OLDNEW
« 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