webrtc_m130/webrtc/base/systeminfo.h
skvlad ffb865f3e0 Revert of Delete unused code from systeminfo. (patchset #3 id:40001 of https://codereview.webrtc.org/2578323005/ )
Reason for revert:
Breaks downstream build.

Original issue's description:
> Delete unused code from systeminfo.
>
> BUG=webrtc:6906
>
> Review-Url: https://codereview.webrtc.org/2578323005
> Cr-Commit-Position: refs/heads/master@{#15655}
> Committed: 617ca316e9

TBR=perkj@webrtc.org,kthelgason@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6906

Review-Url: https://codereview.webrtc.org/2584563004 .
Cr-Commit-Position: refs/heads/master@{#15660}
2016-12-17 00:48:28 +00:00

50 lines
1.2 KiB
C++

/*
* Copyright 2008 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_BASE_SYSTEMINFO_H__
#define WEBRTC_BASE_SYSTEMINFO_H__
#include <string>
#include "webrtc/base/basictypes.h"
namespace rtc {
class SystemInfo {
public:
enum Architecture {
SI_ARCH_UNKNOWN = -1,
SI_ARCH_X86 = 0,
SI_ARCH_X64 = 1,
SI_ARCH_ARM = 2
};
SystemInfo();
// The number of CPU Threads in the system.
static int GetMaxCpus();
// The number of CPU Threads currently available to this process.
static int GetCurCpus();
// Identity of the CPUs.
Architecture GetCpuArchitecture();
std::string GetCpuVendor();
// Total amount of physical memory, in bytes.
int64_t GetMemorySize();
// The model name of the machine, e.g. "MacBookAir1,1"
std::string GetMachineModel();
private:
static int logical_cpus_;
};
} // namespace rtc
#endif // WEBRTC_BASE_SYSTEMINFO_H__