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 #include "chrome/browser/extensions/api/system_cpu/cpu_info_provider.h" | 5 #include "chrome/browser/extensions/api/system_cpu/cpu_info_provider.h" |
6 | 6 |
7 #include "base/sys_info.h" | 7 #include "base/sys_info.h" |
8 | 8 |
9 namespace extensions { | 9 namespace extensions { |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 if (cpu_.has_sse41()) features.push_back("sse4_1"); | 57 if (cpu_.has_sse41()) features.push_back("sse4_1"); |
58 if (cpu_.has_sse42()) features.push_back("sse4_2"); | 58 if (cpu_.has_sse42()) features.push_back("sse4_2"); |
59 if (cpu_.has_avx()) features.push_back("avx"); | 59 if (cpu_.has_avx()) features.push_back("avx"); |
60 return features; | 60 return features; |
61 } | 61 } |
62 | 62 |
63 // static | 63 // static |
64 CpuInfoProvider* CpuInfoProvider::Get() { | 64 CpuInfoProvider* CpuInfoProvider::Get() { |
65 if (provider_.Get().get() == NULL) | 65 if (provider_.Get().get() == NULL) |
66 provider_.Get() = new CpuInfoProvider(); | 66 provider_.Get() = new CpuInfoProvider(); |
67 return provider_.Get(); | 67 return provider_.Get().get(); |
68 } | 68 } |
69 | 69 |
70 } // namespace extensions | 70 } // namespace extensions |
OLD | NEW |