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

Unified Diff: third_party/WebKit/Source/core/timing/MemoryInfo.cpp

Issue 2393013002: reflow comments in core/{clipboard,streams,testing,timing} (Closed)
Patch Set: comments (heh!) Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/timing/MemoryInfo.cpp
diff --git a/third_party/WebKit/Source/core/timing/MemoryInfo.cpp b/third_party/WebKit/Source/core/timing/MemoryInfo.cpp
index eee9c1acaab3680ebf04aa189027c96739aa02ff..be531bb18672fe20aac351af214c15b2fb9e1919 100644
--- a/third_party/WebKit/Source/core/timing/MemoryInfo.cpp
+++ b/third_party/WebKit/Source/core/timing/MemoryInfo.cpp
@@ -74,8 +74,9 @@ class HeapSizeCache {
private:
void maybeUpdate() {
- // We rate-limit queries to once every twenty minutes to make it more difficult
- // for attackers to compare memory usage before and after some event.
+ // We rate-limit queries to once every twenty minutes to make it more
+ // difficult for attackers to compare memory usage before and after some
+ // event.
double now = monotonicallyIncreasingTime();
if (now - m_lastUpdateTime >= TwentyMinutesInSeconds) {
update();
@@ -95,10 +96,10 @@ class HeapSizeCache {
HeapInfo m_info;
};
-// We quantize the sizes to make it more difficult for an attacker to see precise
-// impact of operations on memory. The values are used for performance tuning,
-// and hence don't need to be as refined when the value is large, so we threshold
-// at a list of exponentially separated buckets.
+// We quantize the sizes to make it more difficult for an attacker to see
+// precise impact of operations on memory. The values are used for performance
+// tuning, and hence don't need to be as refined when the value is large, so we
+// threshold at a list of exponentially separated buckets.
size_t quantizeMemorySize(size_t size) {
const int numberOfBuckets = 100;
DEFINE_STATIC_LOCAL(Vector<size_t>, bucketSizeList, ());

Powered by Google App Engine
This is Rietveld 408576698