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 "extensions/browser/api/system_memory/memory_info_provider.h" | 5 #include "extensions/browser/api/system_memory/memory_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 |
11 using core_api::system_memory::MemoryInfo; | 11 using api::system_memory::MemoryInfo; |
12 | 12 |
13 // Static member intialization. | 13 // Static member intialization. |
14 base::LazyInstance<scoped_refptr<MemoryInfoProvider> > | 14 base::LazyInstance<scoped_refptr<MemoryInfoProvider> > |
15 MemoryInfoProvider::provider_ = LAZY_INSTANCE_INITIALIZER; | 15 MemoryInfoProvider::provider_ = LAZY_INSTANCE_INITIALIZER; |
16 | 16 |
17 MemoryInfoProvider::MemoryInfoProvider() { | 17 MemoryInfoProvider::MemoryInfoProvider() { |
18 } | 18 } |
19 | 19 |
20 MemoryInfoProvider::~MemoryInfoProvider() { | 20 MemoryInfoProvider::~MemoryInfoProvider() { |
21 } | 21 } |
(...skipping 12 matching lines...) Expand all Loading... |
34 } | 34 } |
35 | 35 |
36 // static | 36 // static |
37 MemoryInfoProvider* MemoryInfoProvider::Get() { | 37 MemoryInfoProvider* MemoryInfoProvider::Get() { |
38 if (provider_.Get().get() == NULL) | 38 if (provider_.Get().get() == NULL) |
39 provider_.Get() = new MemoryInfoProvider(); | 39 provider_.Get() = new MemoryInfoProvider(); |
40 return provider_.Get().get(); | 40 return provider_.Get().get(); |
41 } | 41 } |
42 | 42 |
43 } // namespace extensions | 43 } // namespace extensions |
OLD | NEW |