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

Unified Diff: net/disk_cache/stats.cc

Issue 6780035: Use lock-free lazy initialization for static histogram references (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
« no previous file with comments | « net/disk_cache/stats.h ('k') | net/disk_cache/stats_histogram.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/stats.cc
===================================================================
--- net/disk_cache/stats.cc (revision 80382)
+++ net/disk_cache/stats.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -116,7 +116,7 @@
return StoreStats(backend, *address, stats);
}
-Stats::Stats() : backend_(NULL) {
+Stats::Stats() : backend_(NULL), size_histogram_(NULL) {
}
Stats::~Stats() {
@@ -146,7 +146,7 @@
if (first_time) {
first_time = false;
// ShouldReportAgain() will re-enter this object.
- if (!size_histogram_.get() && backend->cache_type() == net::DISK_CACHE &&
+ if (!size_histogram_ && backend->cache_type() == net::DISK_CACHE &&
backend->ShouldReportAgain()) {
// Stats may be reused when the cache is re-created, but we want only one
// histogram at any given time.
« no previous file with comments | « net/disk_cache/stats.h ('k') | net/disk_cache/stats_histogram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698