| 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 friend class TestMemoryInfoProvider; | 26 friend class TestMemoryInfoProvider; |
| 29 | 27 |
| 30 MemoryInfoProvider(); | 28 MemoryInfoProvider(); |
| 31 virtual ~MemoryInfoProvider(); | 29 virtual ~MemoryInfoProvider(); |
| 32 | 30 |
| 33 DISALLOW_COPY_AND_ASSIGN(MemoryInfoProvider); | 31 DISALLOW_COPY_AND_ASSIGN(MemoryInfoProvider); |
| 34 }; | 32 }; |
| 35 | 33 |
| 36 } // namespace extensions | 34 } // namespace extensions |
| 37 | 35 |
| 38 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_MEMORY_MEMORY_INFO_PROVIDER
_H_ | 36 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ |
| 39 | 37 |
| OLD | NEW |