Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h

Issue 10831353: Add a generic template for system info provider (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Code polishment Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_ 4 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_
5 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_ 5 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_
6 6
7 #include "chrome/browser/extensions/system_info_provider.h"
7 #include "chrome/common/extensions/api/experimental_system_info_cpu.h" 8 #include "chrome/common/extensions/api/experimental_system_info_cpu.h"
8 9
9 namespace extensions { 10 namespace extensions {
10 11
11 // An interface for retrieving cpu information on different platforms. 12 typedef SystemInfoProvider<api::experimental_system_info_cpu::CpuInfo>
12 class CpuInfoProvider { 13 CpuInfoProvider;
13 public:
14 // Return a CpuInfoProvider instance. The caller is responsible for
15 // releasing it.
16 static CpuInfoProvider* Create();
17
18 virtual ~CpuInfoProvider() {}
19
20 // Return true if succeed to get CPU information, otherwise return false.
21 // Should be implemented on different platforms.
22 virtual bool GetCpuInfo(
23 api::experimental_system_info_cpu::CpuInfo* info) = 0;
24 };
25 14
26 } // namespace extensions 15 } // namespace extensions
16
27 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_ 17 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_
18
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698