OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 EXTENSIONS_BROWSER_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ |
6 #define EXTENSIONS_BROWSER_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ | 6 #define EXTENSIONS_BROWSER_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ |
7 | 7 |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/macros.h" |
9 #include "extensions/browser/api/system_info/system_info_provider.h" | 10 #include "extensions/browser/api/system_info/system_info_provider.h" |
10 #include "extensions/common/api/system_memory.h" | 11 #include "extensions/common/api/system_memory.h" |
11 | 12 |
12 namespace extensions { | 13 namespace extensions { |
13 | 14 |
14 class MemoryInfoProvider : public SystemInfoProvider { | 15 class MemoryInfoProvider : public SystemInfoProvider { |
15 public: | 16 public: |
16 static MemoryInfoProvider* Get(); | 17 static MemoryInfoProvider* Get(); |
17 | 18 |
18 const api::system_memory::MemoryInfo& memory_info() const { return info_; } | 19 const api::system_memory::MemoryInfo& memory_info() const { return info_; } |
(...skipping 19 matching lines...) Expand all Loading... |
38 api::system_memory::MemoryInfo info_; | 39 api::system_memory::MemoryInfo info_; |
39 | 40 |
40 static base::LazyInstance<scoped_refptr<MemoryInfoProvider> > provider_; | 41 static base::LazyInstance<scoped_refptr<MemoryInfoProvider> > provider_; |
41 | 42 |
42 DISALLOW_COPY_AND_ASSIGN(MemoryInfoProvider); | 43 DISALLOW_COPY_AND_ASSIGN(MemoryInfoProvider); |
43 }; | 44 }; |
44 | 45 |
45 } // namespace extensions | 46 } // namespace extensions |
46 | 47 |
47 #endif // EXTENSIONS_BROWSER_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ | 48 #endif // EXTENSIONS_BROWSER_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ |
OLD | NEW |