diff options
author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-19 04:01:56 +0000 |
---|---|---|
committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-19 04:01:56 +0000 |
commit | afbb80036f3f52f8f1d94ebf7f05df47172f734f (patch) | |
tree | 7a7e23f224e115dbfc64a04cbea1a4d45aeb4a28 /net/disk_cache | |
parent | b151ba78727d81aac36a66b8ce4f984cb78a611e (diff) | |
download | chromium_src-afbb80036f3f52f8f1d94ebf7f05df47172f734f.zip chromium_src-afbb80036f3f52f8f1d94ebf7f05df47172f734f.tar.gz chromium_src-afbb80036f3f52f8f1d94ebf7f05df47172f734f.tar.bz2 |
Removed static variable for histograms to avoid race with
histogram initialization across threads.
BUG=76092
TEST=histogram unit tests. Sync tests
R=jar
Review URL: http://codereview.chromium.org/6712040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78809 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r-- | net/disk_cache/histogram_macros.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/disk_cache/histogram_macros.h b/net/disk_cache/histogram_macros.h index 044302c..e238599 100644 --- a/net/disk_cache/histogram_macros.h +++ b/net/disk_cache/histogram_macros.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -20,7 +20,7 @@ #define CACHE_HISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, bucket_count) \ do { \ - static scoped_refptr<base::Histogram> counter; \ + scoped_refptr<base::Histogram> counter; \ if (!counter || name != counter->histogram_name()) \ counter = base::Histogram::FactoryGet( \ name, min, max, bucket_count, \ @@ -39,7 +39,7 @@ #define CACHE_HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) \ do { \ - static scoped_refptr<base::Histogram> counter; \ + scoped_refptr<base::Histogram> counter; \ if (!counter || name != counter->histogram_name()) \ counter = base::Histogram::FactoryTimeGet( \ name, min, max, bucket_count, \ @@ -52,7 +52,7 @@ base::TimeDelta::FromSeconds(10), 50) #define CACHE_HISTOGRAM_ENUMERATION(name, sample, boundary_value) do { \ - static scoped_refptr<base::Histogram> counter; \ + scoped_refptr<base::Histogram> counter; \ if (!counter || name != counter->histogram_name()) \ counter = base::LinearHistogram::FactoryGet( \ name, 1, boundary_value, boundary_value + 1, \ |