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

Side by Side Diff: blimp/net/blimp_connection_statistics.cc

Issue 2008283004: Revert of Added a debug info UI for Blimp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "blimp/net/blimp_connection_statistics.h"
6
7 namespace blimp {
8
9 BlimpConnectionStatistics::BlimpConnectionStatistics()
10 : histogram_(
11 base::SparseHistogram::FactoryGet("BlimpSparseHistogram",
12 base::HistogramBase::kNoFlags)) {}
13
14 BlimpConnectionStatistics::~BlimpConnectionStatistics() {}
15
16 void BlimpConnectionStatistics::Add(EventType type, int data) {
17 histogram_->AddCount(type, data);
18 }
19
20 int BlimpConnectionStatistics::Get(EventType type) {
21 std::unique_ptr<base::HistogramSamples> snapshot =
22 histogram_->SnapshotSamples();
23 return snapshot->GetCount(type);
24 }
25
26 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/net/blimp_connection_statistics.h ('k') | blimp/net/blimp_connection_statistics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698