| 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_CPU_CPU_INFO_PROVIDER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_SYSTEM_CPU_CPU_INFO_PROVIDER_H_ |
| 6 #define EXTENSIONS_BROWSER_API_SYSTEM_CPU_CPU_INFO_PROVIDER_H_ | 6 #define EXTENSIONS_BROWSER_API_SYSTEM_CPU_CPU_INFO_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/cpu.h" | 10 #include "base/cpu.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // The last information filled up by QueryInfo and is accessed on multiple | 44 // The last information filled up by QueryInfo and is accessed on multiple |
| 45 // threads, but the whole class is being guarded by SystemInfoProvider base | 45 // threads, but the whole class is being guarded by SystemInfoProvider base |
| 46 // class. | 46 // class. |
| 47 // | 47 // |
| 48 // |info_| is accessed on the UI thread while |is_waiting_for_completion_| is | 48 // |info_| is accessed on the UI thread while |is_waiting_for_completion_| is |
| 49 // false and on the sequenced worker pool while |is_waiting_for_completion_| | 49 // false and on the sequenced worker pool while |is_waiting_for_completion_| |
| 50 // is true. | 50 // is true. |
| 51 api::system_cpu::CpuInfo info_; | 51 api::system_cpu::CpuInfo info_; |
| 52 | 52 |
| 53 static base::LazyInstance<scoped_refptr<CpuInfoProvider> > provider_; | 53 static base::LazyInstance<scoped_refptr<CpuInfoProvider>>::DestructorAtExit |
| 54 provider_; |
| 54 base::CPU cpu_; | 55 base::CPU cpu_; |
| 55 | 56 |
| 56 DISALLOW_COPY_AND_ASSIGN(CpuInfoProvider); | 57 DISALLOW_COPY_AND_ASSIGN(CpuInfoProvider); |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 } // namespace extensions | 60 } // namespace extensions |
| 60 | 61 |
| 61 #endif // EXTENSIONS_BROWSER_API_SYSTEM_CPU_CPU_INFO_PROVIDER_H_ | 62 #endif // EXTENSIONS_BROWSER_API_SYSTEM_CPU_CPU_INFO_PROVIDER_H_ |
| OLD | NEW |