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

Side by Side Diff: chrome/browser/metrics/metrics_service_unittest.cc

Issue 8501005: Include PPAPI plugin crashes in the plugin crash data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use filename for PPAPI plugins with no name. Created 9 years, 1 month 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 #include "chrome/browser/metrics/metrics_service.h" 5 #include "chrome/browser/metrics/metrics_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 10
(...skipping 10 matching lines...) Expand all
21 for (uint32 i = 0; i < clientid.length(); i++) { 21 for (uint32 i = 0; i < clientid.length(); i++) {
22 char current = clientid.at(i); 22 char current = clientid.at(i);
23 if (i == 8 || i == 13 || i == 18 || i == 23) { 23 if (i == 8 || i == 13 || i == 18 || i == 23) {
24 EXPECT_EQ('-', current); 24 EXPECT_EQ('-', current);
25 } else { 25 } else {
26 EXPECT_TRUE(std::string::npos != hexchars.find(current)); 26 EXPECT_TRUE(std::string::npos != hexchars.find(current));
27 } 27 }
28 } 28 }
29 } 29 }
30 30
31 TEST(MetricsServiceTest, IsPluginProcess) {
32 EXPECT_TRUE(
33 MetricsService::IsPluginProcess(ChildProcessInfo::PLUGIN_PROCESS));
34 EXPECT_FALSE(
35 MetricsService::IsPluginProcess(ChildProcessInfo::GPU_PROCESS));
36 #if defined(OS_CHROMEOS)
37 bool ppapi_plugin = true;
38 #else
39 bool ppapi_plugin = false;
40 #endif
41 EXPECT_EQ(
42 ppapi_plugin,
43 MetricsService::IsPluginProcess(ChildProcessInfo::PPAPI_PLUGIN_PROCESS));
jar (doing other things) 2011/11/08 22:16:31 This ifdef should also go away when you use the lo
petkov 2011/11/09 14:21:07 Done.
44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698