| 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_MEMORY_MEMORY_INFO_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_MEMORY_MEMORY_INFO_PROVIDER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/api/system_info/system_info_provider.h" | 8 #include "chrome/browser/extensions/api/system_info/system_info_provider.h" |
| 9 #include "chrome/common/extensions/api/system_info_memory.h" | 9 #include "chrome/common/extensions/api/system_memory.h" |
| 10 | 10 |
| 11 namespace extensions { | 11 namespace extensions { |
| 12 | 12 |
| 13 class MemoryInfoProvider | 13 class MemoryInfoProvider |
| 14 : public SystemInfoProvider< | 14 : public SystemInfoProvider<api::system_memory::MemoryInfo> { |
| 15 api::system_info_memory::MemoryInfo> { | |
| 16 public: | 15 public: |
| 17 static MemoryInfoProvider* Get(); | 16 static MemoryInfoProvider* Get(); |
| 18 | 17 |
| 19 // Overriden from SystemInfoProvider<MemoryInfo>. | 18 // Overriden from SystemInfoProvider<MemoryInfo>. |
| 20 virtual bool QueryInfo() OVERRIDE; | 19 virtual bool QueryInfo() OVERRIDE; |
| 21 | 20 |
| 22 const api::system_info_memory::MemoryInfo& memory_info() const; | 21 const api::system_memory::MemoryInfo& memory_info() const; |
| 23 | 22 |
| 24 private: | 23 private: |
| 25 friend class SystemInfoProvider< | 24 friend class SystemInfoProvider<api::system_memory::MemoryInfo>; |
| 26 api::system_info_memory::MemoryInfo>; | |
| 27 friend class MockMemoryInfoProviderImpl; | 25 friend class MockMemoryInfoProviderImpl; |
| 28 | 26 |
| 29 MemoryInfoProvider(); | 27 MemoryInfoProvider(); |
| 30 virtual ~MemoryInfoProvider(); | 28 virtual ~MemoryInfoProvider(); |
| 31 | 29 |
| 32 DISALLOW_COPY_AND_ASSIGN(MemoryInfoProvider); | 30 DISALLOW_COPY_AND_ASSIGN(MemoryInfoProvider); |
| 33 }; | 31 }; |
| 34 | 32 |
| 35 } // namespace extensions | 33 } // namespace extensions |
| 36 | 34 |
| 37 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_MEMORY_MEMORY_INFO_PROVIDER
_H_ | 35 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ |
| 38 | 36 |
| OLD | NEW |