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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_unittest.cc

Issue 1662523004: Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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
« no previous file with comments | « chrome/browser/prefs/profile_pref_store_manager_unittest.cc ('k') | chromecast/browser/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/ui/app_list/app_list_service.h" 5 #include "chrome/browser/ui/app_list/app_list_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 user_data_dir_ = base::FilePath(FILE_PATH_LITERAL("udd")); 93 user_data_dir_ = base::FilePath(FILE_PATH_LITERAL("udd"));
94 profile1_.reset( 94 profile1_.reset(
95 new FakeProfile("p1", user_data_dir_.AppendASCII("profile1"))); 95 new FakeProfile("p1", user_data_dir_.AppendASCII("profile1")));
96 profile2_.reset( 96 profile2_.reset(
97 new FakeProfile("p2", user_data_dir_.AppendASCII("profile2"))); 97 new FakeProfile("p2", user_data_dir_.AppendASCII("profile2")));
98 PrefRegistrySimple* pref_registry = new PrefRegistrySimple; 98 PrefRegistrySimple* pref_registry = new PrefRegistrySimple;
99 99
100 AppListService::RegisterPrefs(pref_registry); 100 AppListService::RegisterPrefs(pref_registry);
101 profiles::RegisterPrefs(pref_registry); 101 profiles::RegisterPrefs(pref_registry);
102 102
103 base::PrefServiceFactory factory; 103 PrefServiceFactory factory;
104 factory.set_user_prefs(make_scoped_refptr(new TestingPrefStore)); 104 factory.set_user_prefs(make_scoped_refptr(new TestingPrefStore));
105 local_state_ = factory.Create(pref_registry); 105 local_state_ = factory.Create(pref_registry);
106 106
107 profile_store_ = new FakeProfileStore(user_data_dir_, local_state_.get()); 107 profile_store_ = new FakeProfileStore(user_data_dir_, local_state_.get());
108 service_.reset(new TestingAppListServiceImpl( 108 service_.reset(new TestingAppListServiceImpl(
109 command_line, 109 command_line,
110 local_state_.get(), 110 local_state_.get(),
111 scoped_ptr<ProfileStore>(profile_store_))); 111 scoped_ptr<ProfileStore>(profile_store_)));
112 } 112 }
113 113
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 EXPECT_EQ(AppListService::ENABLE_FOR_APP_INSTALL, 270 EXPECT_EQ(AppListService::ENABLE_FOR_APP_INSTALL,
271 local_state_->GetInteger(prefs::kAppListEnableMethod)); 271 local_state_->GetInteger(prefs::kAppListEnableMethod));
272 EXPECT_NE(0, local_state_->GetInt64(prefs::kAppListEnableTime)); 272 EXPECT_NE(0, local_state_->GetInt64(prefs::kAppListEnableTime));
273 273
274 // An auto-show here should update the enable method to prevent recording it 274 // An auto-show here should update the enable method to prevent recording it
275 // as ENABLE_FOR_APP_INSTALL. 275 // as ENABLE_FOR_APP_INSTALL.
276 service_->ShowForAppInstall(profile1_.get(), "", false); 276 service_->ShowForAppInstall(profile1_.get(), "", false);
277 EXPECT_EQ(AppListService::ENABLE_SHOWN_UNDISCOVERED, 277 EXPECT_EQ(AppListService::ENABLE_SHOWN_UNDISCOVERED,
278 local_state_->GetInteger(prefs::kAppListEnableMethod)); 278 local_state_->GetInteger(prefs::kAppListEnableMethod));
279 } 279 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/profile_pref_store_manager_unittest.cc ('k') | chromecast/browser/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698