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

Side by Side Diff: chrome/browser/chrome_browser_application_mac_unittest.mm

Issue 10703037: Move StatisticsRecorder out of histogram.cc/h for further refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "base/mac/scoped_nsexception_enabler.h" 7 #import "base/mac/scoped_nsexception_enabler.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/metrics/statistics_recorder.h"
9 #import "chrome/browser/chrome_browser_application_mac.h" 10 #import "chrome/browser/chrome_browser_application_mac.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 using base::Histogram; 13 using base::Histogram;
13 using base::StatisticsRecorder; 14 using base::StatisticsRecorder;
14 15
15 namespace chrome_browser_application_mac { 16 namespace chrome_browser_application_mac {
16 17
17 // Generate an NSException with the given name. 18 // Generate an NSException with the given name.
18 NSException* ExceptionNamed(NSString* name) { 19 NSException* ExceptionNamed(NSString* name) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 EXPECT_EQ(1, sample.counts(1)); 79 EXPECT_EQ(1, sample.counts(1));
79 EXPECT_EQ(3, sample.counts(2)); 80 EXPECT_EQ(3, sample.counts(2));
80 EXPECT_EQ(2, sample.counts(3)); 81 EXPECT_EQ(2, sample.counts(3));
81 82
82 // The unknown exceptions should end up in the overflow bucket. 83 // The unknown exceptions should end up in the overflow bucket.
83 EXPECT_EQ(kUnknownNSException + 1, histograms[0]->bucket_count()); 84 EXPECT_EQ(kUnknownNSException + 1, histograms[0]->bucket_count());
84 EXPECT_EQ(4, sample.counts(kUnknownNSException)); 85 EXPECT_EQ(4, sample.counts(kUnknownNSException));
85 } 86 }
86 87
87 } // chrome_browser_application_mac 88 } // chrome_browser_application_mac
OLDNEW
« no previous file with comments | « base/metrics/statistics_recorder.cc ('k') | chrome/browser/extensions/api/metrics/metrics_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698