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

Side by Side Diff: chrome/browser/extensions/extension_metrics_apitest.cc

Issue 5783006: Cleanup: Remove unneeded includes of notification_service.h in other headers.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <map> 5 #include <map>
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
11 #include "chrome/common/notification_registrar.h" 11 #include "chrome/common/notification_registrar.h"
12 #include "chrome/common/notification_service.h"
12 13
13 namespace { 14 namespace {
14 15
15 // The tests that are run by this extension are expected to record the following 16 // The tests that are run by this extension are expected to record the following
16 // user actions, with the specified counts. If the tests in test.js are 17 // user actions, with the specified counts. If the tests in test.js are
17 // modified, this array may need to be updated. 18 // modified, this array may need to be updated.
18 struct RecordedUserAction { 19 struct RecordedUserAction {
19 const char* name; // base name of metric without extension id. 20 const char* name; // base name of metric without extension id.
20 int count; // number of times the metric was recorded. 21 int count; // number of times the metric was recorded.
21 } g_user_actions[] = { 22 } g_user_actions[] = {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 147
147 ASSERT_TRUE(RunExtensionTest("metrics")) << message_; 148 ASSERT_TRUE(RunExtensionTest("metrics")) << message_;
148 const Extension* extension = GetSingleLoadedExtension(); 149 const Extension* extension = GetSingleLoadedExtension();
149 ASSERT_TRUE(extension); 150 ASSERT_TRUE(extension);
150 151
151 observer.ValidateUserActions(extension, 152 observer.ValidateUserActions(extension,
152 g_user_actions, 153 g_user_actions,
153 arraysize(g_user_actions)); 154 arraysize(g_user_actions));
154 ValidateHistograms(extension, g_histograms, arraysize(g_histograms)); 155 ValidateHistograms(extension, g_histograms, arraysize(g_histograms));
155 } 156 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_messages_apitest.cc ('k') | chrome/browser/extensions/extension_tabs_module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698