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 "base/macros.h" |
10 #include "extensions/browser/api/system_info/system_info_provider.h" | 10 #include "extensions/browser/api/system_info/system_info_provider.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // The last information filled up by QueryInfo and is accessed on multiple | 32 // The last information filled up by QueryInfo and is accessed on multiple |
33 // threads, but the whole class is being guarded by SystemInfoProvider base | 33 // threads, but the whole class is being guarded by SystemInfoProvider base |
34 // class. | 34 // class. |
35 // | 35 // |
36 // |info_| is accessed on the UI thread while |is_waiting_for_completion_| is | 36 // |info_| is accessed on the UI thread while |is_waiting_for_completion_| is |
37 // false and on the sequenced worker pool while |is_waiting_for_completion_| | 37 // false and on the sequenced worker pool while |is_waiting_for_completion_| |
38 // is true. | 38 // is true. |
39 api::system_memory::MemoryInfo info_; | 39 api::system_memory::MemoryInfo info_; |
40 | 40 |
41 static base::LazyInstance<scoped_refptr<MemoryInfoProvider> > provider_; | 41 static base::LazyInstance<scoped_refptr<MemoryInfoProvider>>::DestructorAtExit |
| 42 provider_; |
42 | 43 |
43 DISALLOW_COPY_AND_ASSIGN(MemoryInfoProvider); | 44 DISALLOW_COPY_AND_ASSIGN(MemoryInfoProvider); |
44 }; | 45 }; |
45 | 46 |
46 } // namespace extensions | 47 } // namespace extensions |
47 | 48 |
48 #endif // EXTENSIONS_BROWSER_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ | 49 #endif // EXTENSIONS_BROWSER_API_SYSTEM_MEMORY_MEMORY_INFO_PROVIDER_H_ |
OLD | NEW |