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

Side by Side Diff: blimp/net/blimp_stats.h

Issue 2253513004: Fix off-by-one error in counter array sizing in BlimpStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: spaces around plus Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | blimp/net/blimp_stats.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BLIMP_NET_BLIMP_STATS_H_ 5 #ifndef BLIMP_NET_BLIMP_STATS_H_
6 #define BLIMP_NET_BLIMP_STATS_H_ 6 #define BLIMP_NET_BLIMP_STATS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 friend struct base::DefaultLazyInstanceTraits<BlimpStats>; 42 friend struct base::DefaultLazyInstanceTraits<BlimpStats>;
43 43
44 static base::LazyInstance<BlimpStats> instance_; 44 static base::LazyInstance<BlimpStats> instance_;
45 45
46 BlimpStats(); 46 BlimpStats();
47 ~BlimpStats(); 47 ~BlimpStats();
48 48
49 // Values must be read or modified using base::subtle::NoBarrier* functions. 49 // Values must be read or modified using base::subtle::NoBarrier* functions.
50 // We are using the NoBarrier* functions because we value performance over 50 // We are using the NoBarrier* functions because we value performance over
51 // accuracy of the data. 51 // accuracy of the data.
52 base::subtle::Atomic32 values_[EVENT_TYPE_MAX]; 52 base::subtle::Atomic32 values_[EVENT_TYPE_MAX + 1];
53 53
54 DISALLOW_COPY_AND_ASSIGN(BlimpStats); 54 DISALLOW_COPY_AND_ASSIGN(BlimpStats);
55 }; 55 };
56 56
57 } // namespace blimp 57 } // namespace blimp
58 58
59 #endif // BLIMP_NET_BLIMP_STATS_H_ 59 #endif // BLIMP_NET_BLIMP_STATS_H_
OLDNEW
« no previous file with comments | « no previous file | blimp/net/blimp_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698