Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1191)

Side by Side Diff: base/sys_info_internal.h

Issue 67373006: Cache the numberOfProcessors value on posix and expose it to blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/base.gypi ('k') | base/sys_info_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BASE_SYS_INFO_INTERNAL_H_
6 #define BASE_SYS_INFO_INTERNAL_H_
7
8 #include "base/basictypes.h"
9
10 namespace base {
11
12 namespace internal {
13
14 template<typename T, T (*F)(void)>
15 class LazySysInfoValue {
16 public:
17 LazySysInfoValue()
18 : value_(F()) { }
19
20 ~LazySysInfoValue() { }
21
22 T value() { return value_; }
23
24 private:
25 const T value_;
26
27 DISALLOW_COPY_AND_ASSIGN(LazySysInfoValue);
28 };
29
30 } // namespace internal
31
32 } // namespace base
33
34 #endif // BASE_SYS_INFO_INTERNAL_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/sys_info_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698