OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 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 DALVIK_VM_HEAP_SIZE_ANDROID_H_ | |
6 #define DALVIK_VM_HEAP_SIZE_ANDROID_H_ | |
7 | |
8 #include <string> | |
9 #include <sys/system_properties.h> | |
10 | |
11 #include "base/string_number_conversions.h" | |
tonyg
2012/04/19 16:04:30
The two includes above should move to the .cc file
ulan
2012/04/19 17:46:24
Done.
| |
12 | |
13 namespace webkit_glue{ | |
tonyg
2012/04/19 16:04:30
nit: space before {
ulan
2012/04/19 17:46:24
Done.
| |
14 // A simple class to cache the heap size of the device. | |
15 class DalvikHeapSize { | |
16 public: | |
17 // Retrieves the Singleton. | |
18 static DalvikHeapSize* GetInstance(); | |
19 | |
20 DalvikHeapSize(); | |
21 ~DalvikHeapSize(); | |
tonyg
2012/04/19 16:04:30
These should both be private since it is only supp
ulan
2012/04/19 17:46:24
This gives compiler error, Singleton apparently re
| |
22 | |
23 int HeapSizeMB(); | |
tonyg
2012/04/19 16:04:30
Mark this const.
ulan
2012/04/19 17:46:24
Done.
| |
24 | |
25 private: | |
26 | |
tonyg
2012/04/19 16:04:30
No need for this linebreak
ulan
2012/04/19 17:46:24
Done.
| |
27 int heap_size_mb_; | |
28 | |
29 int ParseHeapSize(const std::string& str); | |
tonyg
2012/04/19 16:04:30
const
ulan
2012/04/19 17:46:24
Done.
| |
30 }; | |
31 | |
32 } // webkit_glue namespace | |
33 | |
34 #endif // DALVIK_VM_HEAP_SIZE_ANDROID_H_ | |
OLD | NEW |