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

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

Issue 1962393004: Added a debug info UI for Blimp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Kevin's comments 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 #include "base/logging.h"
Kevin M 2016/05/24 21:49:00 Not used.
shaktisahu 2016/05/24 22:42:14 Done.
shaktisahu 2016/05/24 22:42:14 Done.
8
9 namespace blimp {
10
11 BlimpConnectionStatistics::BlimpConnectionStatistics()
12 : histogram_(
13 base::SparseHistogram::FactoryGet("BlimpSparseHistogram",
14 base::HistogramBase::kNoFlags)) {}
15
16 BlimpConnectionStatistics::~BlimpConnectionStatistics() {}
17
18 void BlimpConnectionStatistics::Add(EventType type, int data) {
19 histogram_->AddCount(type, data);
20 }
21
22 int BlimpConnectionStatistics::Get(EventType type) {
23 std::unique_ptr<base::HistogramSamples> snapshot =
24 histogram_->SnapshotSamples();
25 return snapshot->GetCount(type);
26 }
27
28 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698