| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h" | 5 #include "chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h" |
| 6 | 6 |
| 7 namespace extensions { | 7 namespace extensions { |
| 8 | 8 |
| 9 namespace { |
| 10 |
| 9 using api::experimental_system_info_cpu::CpuInfo; | 11 using api::experimental_system_info_cpu::CpuInfo; |
| 10 | 12 |
| 11 // CpuInfoProvider implementation for Linux platform. | 13 // CpuInfoProvider implementation for Linux platform. |
| 12 class CpuInfoProviderLinux : public CpuInfoProvider { | 14 class CpuInfoProviderLinux : public CpuInfoProvider { |
| 13 public: | 15 public: |
| 14 CpuInfoProviderLinux() {} | 16 CpuInfoProviderLinux() {} |
| 15 virtual ~CpuInfoProviderLinux() {} | 17 virtual ~CpuInfoProviderLinux() {} |
| 16 virtual bool QueryInfo(CpuInfo* info) OVERRIDE; | 18 virtual bool QueryInfo(CpuInfo* info) OVERRIDE; |
| 17 }; | 19 }; |
| 18 | 20 |
| 19 bool CpuInfoProviderLinux::QueryInfo(CpuInfo* info) { | 21 bool CpuInfoProviderLinux::QueryInfo(CpuInfo* info) { |
| 20 // TODO(hmin): not implemented yet. | 22 // TODO(hmin): not implemented yet. |
| 21 return false; | 23 return false; |
| 22 } | 24 } |
| 23 | 25 |
| 26 } // namespace |
| 27 |
| 24 // static | 28 // static |
| 25 template<> | |
| 26 CpuInfoProvider* CpuInfoProvider::Get() { | 29 CpuInfoProvider* CpuInfoProvider::Get() { |
| 27 return CpuInfoProvider::GetInstance<CpuInfoProviderLinux>(); | 30 return CpuInfoProvider::GetInstance<CpuInfoProviderLinux>(); |
| 28 } | 31 } |
| 29 | 32 |
| 30 } // namespace extensions | 33 } // namespace extensions |
| OLD | NEW |