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

Unified Diff: chrome/browser/search/hotword_service_unittest.cc

Issue 731373002: Enable MSVC warning for unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Windows fix Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/process_singleton_win.cc ('k') | chrome/browser/search/suggestions/suggestions_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/hotword_service_unittest.cc
diff --git a/chrome/browser/search/hotword_service_unittest.cc b/chrome/browser/search/hotword_service_unittest.cc
index c35932ed5ffbde496fd9f98d1c61d275817f2bbb..8d6204709e77f12271e7b197a46b21aed19432a5 100644
--- a/chrome/browser/search/hotword_service_unittest.cc
+++ b/chrome/browser/search/hotword_service_unittest.cc
@@ -117,13 +117,10 @@ TEST_P(HotwordServiceTest, IsHotwordAllowedBadFieldTrial) {
TestingProfile::Builder profile_builder;
scoped_ptr<TestingProfile> profile = profile_builder.Build();
- HotwordServiceFactory* hotword_service_factory =
- HotwordServiceFactory::GetInstance();
-
// Check that the service exists so that a NULL service be ruled out in
// following tests.
HotwordService* hotword_service =
- hotword_service_factory->GetForProfile(profile.get());
+ HotwordServiceFactory::GetForProfile(profile.get());
EXPECT_TRUE(hotword_service != NULL);
// When the field trial is empty or Disabled, it should not be allowed.
@@ -137,7 +134,7 @@ TEST_P(HotwordServiceTest, IsHotwordAllowedBadFieldTrial) {
hotword_internal::kHotwordFieldTrialDisabledGroupName));
group = base::FieldTrialList::FindFullName(
hotword_internal::kHotwordFieldTrialName);
- EXPECT_TRUE(group ==hotword_internal::kHotwordFieldTrialDisabledGroupName);
+ EXPECT_TRUE(group == hotword_internal::kHotwordFieldTrialDisabledGroupName);
EXPECT_FALSE(HotwordServiceFactory::IsHotwordAllowed(profile.get()));
// Set a valid locale with invalid field trial to be sure it is
@@ -154,13 +151,10 @@ TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) {
TestingProfile::Builder profile_builder;
scoped_ptr<TestingProfile> profile = profile_builder.Build();
- HotwordServiceFactory* hotword_service_factory =
- HotwordServiceFactory::GetInstance();
-
// Check that the service exists so that a NULL service be ruled out in
// following tests.
HotwordService* hotword_service =
- hotword_service_factory->GetForProfile(profile.get());
+ HotwordServiceFactory::GetForProfile(profile.get());
EXPECT_TRUE(hotword_service != NULL);
// Set the field trial to a valid one.
@@ -194,10 +188,8 @@ TEST_P(HotwordServiceTest, AudioLoggingPrefSetCorrectly) {
TestingProfile::Builder profile_builder;
scoped_ptr<TestingProfile> profile = profile_builder.Build();
- HotwordServiceFactory* hotword_service_factory =
- HotwordServiceFactory::GetInstance();
HotwordService* hotword_service =
- hotword_service_factory->GetForProfile(profile.get());
+ HotwordServiceFactory::GetForProfile(profile.get());
EXPECT_TRUE(hotword_service != NULL);
// If it's a fresh profile, although the default value is true,
« no previous file with comments | « chrome/browser/process_singleton_win.cc ('k') | chrome/browser/search/suggestions/suggestions_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698