OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "base/metrics/histogram.h" | 5 #include "base/metrics/histogram.h" |
6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "chrome/browser/extensions/activity_log/uma_policy.h" | 7 #include "chrome/browser/extensions/activity_log/uma_policy.h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/extensions/test_extension_dir.h" | 11 #include "chrome/browser/extensions/test_extension_dir.h" |
12 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
13 #include "chrome/common/extensions/extension_file_util.h" | |
14 #include "chrome/test/base/ui_test_utils.h" | 13 #include "chrome/test/base/ui_test_utils.h" |
15 #include "extensions/common/manifest_constants.h" | 14 #include "extensions/common/manifest_constants.h" |
16 #include "net/dns/mock_host_resolver.h" | 15 #include "net/dns/mock_host_resolver.h" |
17 | 16 |
18 using extensions::UmaPolicy; | 17 using extensions::UmaPolicy; |
19 | 18 |
20 const char* kGooglePrefix = "ExtensionActivity.Google"; | 19 const char* kGooglePrefix = "ExtensionActivity.Google"; |
21 const char* kNonGooglePrefix = "ExtensionActivity"; | 20 const char* kNonGooglePrefix = "ExtensionActivity"; |
22 | 21 |
23 // These tests need to ensure that all of the extension JavaScript completes | 22 // These tests need to ensure that all of the extension JavaScript completes |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 292 |
294 base::HistogramBase* cnn_histogram = base::Histogram::FactoryGet( | 293 base::HistogramBase* cnn_histogram = base::Histogram::FactoryGet( |
295 std::string(kNonGooglePrefix) + "." + std::string(subset_two[i]), | 294 std::string(kNonGooglePrefix) + "." + std::string(subset_two[i]), |
296 1, 100, 50, base::HistogramBase::kNoFlags); | 295 1, 100, 50, base::HistogramBase::kNoFlags); |
297 scoped_ptr<base::HistogramSamples> cnn_samples = | 296 scoped_ptr<base::HistogramSamples> cnn_samples = |
298 cnn_histogram->SnapshotSamples(); | 297 cnn_histogram->SnapshotSamples(); |
299 EXPECT_EQ(1, cnn_samples->GetCount(2)); | 298 EXPECT_EQ(1, cnn_samples->GetCount(2)); |
300 } | 299 } |
301 | 300 |
302 } | 301 } |
OLD | NEW |