| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h" |
| 6 |
| 7 #include "base/sys_info.h" |
| 8 |
| 9 namespace extensions { |
| 10 |
| 11 using api::experimental_system_info_cpu::CpuInfo; |
| 12 |
| 13 bool CpuInfoProvider::QueryInfo(CpuInfo* info) { |
| 14 if (info == NULL) |
| 15 return false; |
| 16 |
| 17 info->num_of_processors = base::SysInfo::NumberOfProcessors(); |
| 18 info->arch_name = base::SysInfo::CPUArchitecture(); |
| 19 info->model_name = base::SysInfo::CPUModelName(); |
| 20 return true; |
| 21 } |
| 22 |
| 23 bool CpuInfoProvider::StartSampling(const QueryCpuTimeCallback& callback) { |
| 24 // TODO(hongbo): Implement sampling functionality for event router. |
| 25 return false; |
| 26 } |
| 27 |
| 28 bool CpuInfoProvider::StopSampling() { |
| 29 // TODO(hongbo): Implement sampling functionality for event router. |
| 30 return false; |
| 31 } |
| 32 |
| 33 // static |
| 34 CpuInfoProvider* CpuInfoProvider::Get() { |
| 35 return CpuInfoProvider::GetInstance<CpuInfoProvider>(); |
| 36 } |
| 37 |
| 38 } // namespace extensions |
| OLD | NEW |