summaryrefslogtreecommitdiffstats
path: root/webkit/child
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-20 11:14:51 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-20 11:14:51 +0000
commitc15d1e7756cee2b7febad6ab4e550165238ef514 (patch)
tree4556fb81d66e675088854bdb00b3d58d845f5e9a /webkit/child
parent947e336d09cf625bfe6d14b973aa3411acebe477 (diff)
downloadchromium_src-c15d1e7756cee2b7febad6ab4e550165238ef514.zip
chromium_src-c15d1e7756cee2b7febad6ab4e550165238ef514.tar.gz
chromium_src-c15d1e7756cee2b7febad6ab4e550165238ef514.tar.bz2
Cache the numberOfProcessors value on posix and expose it to blink
We need to cache the value, so we can request it from blink after the sandbox was already turned on. BUG=321060 R=jam@chromium.org,mark@chromium.org,jamesr@chromium.org Review URL: https://codereview.chromium.org/67373006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/child')
-rw-r--r--webkit/child/webkitplatformsupport_impl.cc4
-rw-r--r--webkit/child/webkitplatformsupport_impl.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/webkit/child/webkitplatformsupport_impl.cc b/webkit/child/webkitplatformsupport_impl.cc
index 92d7ad6..48c8854 100644
--- a/webkit/child/webkitplatformsupport_impl.cc
+++ b/webkit/child/webkitplatformsupport_impl.cc
@@ -871,6 +871,10 @@ size_t WebKitPlatformSupportImpl::physicalMemoryMB() {
return static_cast<size_t>(base::SysInfo::AmountOfPhysicalMemoryMB());
}
+size_t WebKitPlatformSupportImpl::numberOfProcessors() {
+ return static_cast<size_t>(base::SysInfo::NumberOfProcessors());
+}
+
void WebKitPlatformSupportImpl::startHeapProfiling(
const blink::WebString& prefix) {
// FIXME(morrita): Make this built on windows.
diff --git a/webkit/child/webkitplatformsupport_impl.h b/webkit/child/webkitplatformsupport_impl.h
index 54e742e..175bfe3 100644
--- a/webkit/child/webkitplatformsupport_impl.h
+++ b/webkit/child/webkitplatformsupport_impl.h
@@ -50,6 +50,7 @@ class WEBKIT_CHILD_EXPORT WebKitPlatformSupportImpl :
virtual size_t memoryUsageMB();
virtual size_t actualMemoryUsageMB();
virtual size_t physicalMemoryMB();
+ virtual size_t numberOfProcessors();
virtual void startHeapProfiling(const blink::WebString& prefix);
virtual void stopHeapProfiling() OVERRIDE;