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

Unified Diff: content/common/content_switches_internal.cc

Issue 1914963002: Introduce v8-cache-strategies-for-cache-storage setting flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/common/content_switches_internal.cc
diff --git a/content/common/content_switches_internal.cc b/content/common/content_switches_internal.cc
index d0d5ec7e9336be17263b143c9e1e3426eaf04d53..4a54502ba14cd90a6ea51d1aace5881cd75f1b9b 100644
--- a/content/common/content_switches_internal.cc
+++ b/content/common/content_switches_internal.cc
@@ -67,6 +67,25 @@ V8CacheOptions GetV8CacheOptions() {
}
}
+V8CacheStrategiesForCacheStorage GetV8CacheStrategiesForCacheStorage() {
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+ std::string v8_cache_strategies = command_line.GetSwitchValueASCII(
+ switches::kV8CacheStrategiesForCacheStorage);
+ if (v8_cache_strategies.empty())
+ v8_cache_strategies =
+ base::FieldTrialList::FindFullName("V8CacheStrategiesForCacheStorage");
+ if (v8_cache_strategies == "none") {
+ return V8_CACHE_STRATEGIES_FOR_CACHE_STORAGE_NONE;
+ } else if (v8_cache_strategies == "normal") {
+ return V8_CACHE_STRATEGIES_FOR_CACHE_STORAGE_NORMAL;
+ } else if (v8_cache_strategies == "aggressive") {
+ return V8_CACHE_STRATEGIES_FOR_CACHE_STORAGE_AGGRESSIVE;
+ } else {
+ return V8_CACHE_STRATEGIES_FOR_CACHE_STORAGE_DEFAULT;
+ }
+}
+
bool IsUseZoomForDSFEnabled() {
static bool use_zoom_for_dsf_enabled_by_default =
IsUseZoomForDSFEnabledByDefault();

Powered by Google App Engine
This is Rietveld 408576698