Commit 3f64ef9f authored by Jeremy Roman's avatar Jeremy Roman Committed by Commit Bot

Use base::SysInfo::NumberOfProcessors directly.

Change-Id: I3b2de4b9175daf66cedd63b62474d35b4f185ab4
Reviewed-on: https://chromium-review.googlesource.com/1038614Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556066}
parent 748f93d6
......@@ -742,10 +742,6 @@ bool BlinkPlatformImpl::DatabaseSetFileSize(
return false;
}
size_t BlinkPlatformImpl::NumberOfProcessors() {
return static_cast<size_t>(base::SysInfo::NumberOfProcessors());
}
size_t BlinkPlatformImpl::MaxDecodedImageBytes() {
const int kMB = 1024 * 1024;
const int kMaxNumberOfBytesPerPixel = 4;
......
......@@ -71,7 +71,6 @@ class CONTENT_EXPORT BlinkPlatformImpl : public blink::Platform {
const blink::WebSecurityOrigin& origin) override;
bool DatabaseSetFileSize(const blink::WebString& vfs_file_name,
long long size) override;
size_t NumberOfProcessors() override;
size_t MaxDecodedImageBytes() override;
bool IsLowEndDevice() override;
......
......@@ -302,9 +302,6 @@ class BLINK_PLATFORM_EXPORT Platform {
// hash must have been generated by calling VisitedLinkHash().
virtual bool IsLinkVisited(unsigned long long link_hash) { return false; }
// Return the number of of processors of the current machine.
virtual size_t NumberOfProcessors() { return 0; }
static const size_t kNoDecodedImageByteLimit = static_cast<size_t>(-1);
// Returns the maximum amount of memory a decoded image should be allowed.
......
......@@ -14,6 +14,7 @@ include_rules = [
"+base/sequenced_task_runner.h",
"+base/single_thread_task_runner.h",
"+base/stl_util.h",
"+base/sys_info.h",
"+base/task_scheduler/post_task.h",
"+base/thread_annotations.h",
"+base/threading/thread_checker.h",
......
......@@ -4,12 +4,12 @@
#include "third_party/blink/renderer/core/frame/navigator_concurrent_hardware.h"
#include "third_party/blink/public/platform/platform.h"
#include "base/sys_info.h"
namespace blink {
unsigned NavigatorConcurrentHardware::hardwareConcurrency() const {
return Platform::Current()->NumberOfProcessors();
return static_cast<unsigned>(base::SysInfo::NumberOfProcessors());
}
} // namespace blink
......@@ -40,6 +40,7 @@ _CONFIG = [
'base::CreateSequencedTaskRunnerWithTraits',
'base::SequencedTaskRunner',
'base::SingleThreadTaskRunner',
'base::SysInfo',
'base::ThreadChecker',
'base::Time',
'base::TimeDelta',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment