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

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

Issue 104493005: Update some uses of Value in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_log.h" 5 #include "chrome/browser/metrics/metrics_log.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 EXPECT_EQ("p1", system_profile.plugin(0).name()); 375 EXPECT_EQ("p1", system_profile.plugin(0).name());
376 EXPECT_EQ("p1.plugin", system_profile.plugin(0).filename()); 376 EXPECT_EQ("p1.plugin", system_profile.plugin(0).filename());
377 EXPECT_EQ("1.5", system_profile.plugin(0).version()); 377 EXPECT_EQ("1.5", system_profile.plugin(0).version());
378 EXPECT_TRUE(system_profile.plugin(0).is_pepper()); 378 EXPECT_TRUE(system_profile.plugin(0).is_pepper());
379 EXPECT_EQ("p2", system_profile.plugin(1).name()); 379 EXPECT_EQ("p2", system_profile.plugin(1).name());
380 EXPECT_EQ("p2.plugin", system_profile.plugin(1).filename()); 380 EXPECT_EQ("p2.plugin", system_profile.plugin(1).filename());
381 EXPECT_EQ("2.0", system_profile.plugin(1).version()); 381 EXPECT_EQ("2.0", system_profile.plugin(1).version());
382 EXPECT_FALSE(system_profile.plugin(1).is_pepper()); 382 EXPECT_FALSE(system_profile.plugin(1).is_pepper());
383 383
384 // Now set some plugin stability stats for p2 and verify they're recorded. 384 // Now set some plugin stability stats for p2 and verify they're recorded.
385 scoped_ptr<base::DictionaryValue> plugin_dict(new DictionaryValue); 385 scoped_ptr<base::DictionaryValue> plugin_dict(new base::DictionaryValue);
386 plugin_dict->SetString(prefs::kStabilityPluginName, "p2"); 386 plugin_dict->SetString(prefs::kStabilityPluginName, "p2");
387 plugin_dict->SetInteger(prefs::kStabilityPluginLaunches, 1); 387 plugin_dict->SetInteger(prefs::kStabilityPluginLaunches, 1);
388 plugin_dict->SetInteger(prefs::kStabilityPluginCrashes, 2); 388 plugin_dict->SetInteger(prefs::kStabilityPluginCrashes, 2);
389 plugin_dict->SetInteger(prefs::kStabilityPluginInstances, 3); 389 plugin_dict->SetInteger(prefs::kStabilityPluginInstances, 3);
390 plugin_dict->SetInteger(prefs::kStabilityPluginLoadingErrors, 4); 390 plugin_dict->SetInteger(prefs::kStabilityPluginLoadingErrors, 4);
391 { 391 {
392 ListPrefUpdate update(log.GetPrefService(), prefs::kStabilityPluginStats); 392 ListPrefUpdate update(log.GetPrefService(), prefs::kStabilityPluginStats);
393 update.Get()->Append(plugin_dict.release()); 393 update.Get()->Append(plugin_dict.release());
394 } 394 }
395 395
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 TestMetricsLog log(kClientId, kSessionId); 580 TestMetricsLog log(kClientId, kSessionId);
581 EXPECT_EQ(1u, log.system_profile().multi_profile_user_count()); 581 EXPECT_EQ(1u, log.system_profile().multi_profile_user_count());
582 582
583 user_manager->LoginUser(user2); 583 user_manager->LoginUser(user2);
584 std::vector<chrome_variations::ActiveGroupId> synthetic_trials; 584 std::vector<chrome_variations::ActiveGroupId> synthetic_trials;
585 log.RecordEnvironment(std::vector<content::WebPluginInfo>(), 585 log.RecordEnvironment(std::vector<content::WebPluginInfo>(),
586 GoogleUpdateMetrics(), synthetic_trials); 586 GoogleUpdateMetrics(), synthetic_trials);
587 EXPECT_EQ(0u, log.system_profile().multi_profile_user_count()); 587 EXPECT_EQ(0u, log.system_profile().multi_profile_user_count());
588 } 588 }
589 #endif // OS_CHROMEOS 589 #endif // OS_CHROMEOS
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_log_serializer_unittest.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698