summaryrefslogtreecommitdiffstats
path: root/content/public
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-08 12:27:37 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-08 12:27:37 +0000
commited1cca4fdce763a8adac1d8764f6b32a8a719d7e (patch)
treebf03e50bce7952e5dffeb44b86e4477408727824 /content/public
parent5e14a1ea6ddd2c01f9f9b06d4a8b1cff83632a4e (diff)
downloadchromium_src-ed1cca4fdce763a8adac1d8764f6b32a8a719d7e.zip
chromium_src-ed1cca4fdce763a8adac1d8764f6b32a8a719d7e.tar.gz
chromium_src-ed1cca4fdce763a8adac1d8764f6b32a8a719d7e.tar.bz2
base: Discardable memory types.
This adds a DiscardableMemoryType enum and a function that can be used to select what type of discardable memory to use. This is generally useful for debugging purposes and when evaluating the performance of one implementation vs another. The unit test framework for discardable memory is improved slightly by testing every supported type on each platform rather then just the one specific type. Furthermore, it allows us to expose ashmem based discardable memory on ChromeOS in about:flags before we make it default. No change in behavior unless the new --use-discardable-memory=type switch is used. BUG=327516 TEST=base_unitttest --gtest_filter=DiscardableMemory* TBR=tomhudson@google.com Review URL: https://codereview.chromium.org/114923005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public')
-rw-r--r--content/public/common/content_switches.cc3
-rw-r--r--content/public/common/content_switches.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index be4cfa8..0b161fc 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -909,6 +909,9 @@ const char kTraceStartupFile[] = "trace-startup-file";
extern const char kUIPrioritizeInGpuProcess[] =
"ui-prioritize-in-gpu-process";
+// Overrides the preferred discardable memory implementation.
+const char kUseDiscardableMemory[] = "use-discardable-memory";
+
// Use fake device for MediaStream to replace actual camera and microphone.
const char kUseFakeDeviceForMediaStream[] = "use-fake-device-for-media-stream";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index 95c4844..4952d43 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -255,6 +255,7 @@ extern const char kTraceStartup[];
extern const char kTraceStartupDuration[];
extern const char kTraceStartupFile[];
CONTENT_EXPORT extern const char kUIPrioritizeInGpuProcess[];
+CONTENT_EXPORT extern const char kUseDiscardableMemory[];
CONTENT_EXPORT extern const char kUseFakeDeviceForMediaStream[];
CONTENT_EXPORT extern const char kUseFakeUIForMediaStream[];
CONTENT_EXPORT extern const char kUseGpuInTests[];