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

Unified Diff: chrome/browser/profiles/profile_list_desktop_browsertest.cc

Issue 1701563002: Refactor ProfileInfoCache in c/b/ui/views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/avatar_menu.cc ('k') | chrome/browser/profiles/profile_list_desktop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_list_desktop_browsertest.cc
diff --git a/chrome/browser/profiles/profile_list_desktop_browsertest.cc b/chrome/browser/profiles/profile_list_desktop_browsertest.cc
index 7f79ebc9bf3f9a5796ebc2549e2952ee836eb437..894583550481da1bf68cc3b9d3c3975690cd7a46 100644
--- a/chrome/browser/profiles/profile_list_desktop_browsertest.cc
+++ b/chrome/browser/profiles/profile_list_desktop_browsertest.cc
@@ -37,8 +37,8 @@ class ProfileListDesktopBrowserTest : public InProcessBrowserTest {
public:
ProfileListDesktopBrowserTest() {}
- scoped_ptr<AvatarMenu> CreateAvatarMenu(ProfileInfoCache* cache) {
- return scoped_ptr<AvatarMenu>(new AvatarMenu(cache, NULL, browser()));
+ scoped_ptr<AvatarMenu> CreateAvatarMenu(ProfileAttributesStorage* storage) {
+ return scoped_ptr<AvatarMenu>(new AvatarMenu(storage, NULL, browser()));
}
private:
@@ -64,9 +64,11 @@ IN_PROC_BROWSER_TEST_F(ProfileListDesktopBrowserTest, MAYBE_SignOut) {
ProfileManager* profile_manager = g_browser_process->profile_manager();
Profile* current_profile = browser()->profile();
ProfileInfoCache& cache = profile_manager->GetProfileInfoCache();
+ ProfileAttributesStorage& storage =
+ profile_manager->GetProfileAttributesStorage();
size_t index = cache.GetIndexOfProfileWithPath(current_profile->GetPath());
- scoped_ptr<AvatarMenu> menu = CreateAvatarMenu(&cache);
+ scoped_ptr<AvatarMenu> menu = CreateAvatarMenu(&storage);
menu->RebuildMenu();
BrowserList* browser_list = BrowserList::GetInstance();
@@ -107,6 +109,8 @@ IN_PROC_BROWSER_TEST_F(ProfileListDesktopBrowserTest, MAYBE_SwitchToProfile) {
ProfileManager* profile_manager = g_browser_process->profile_manager();
Profile* current_profile = browser()->profile();
ProfileInfoCache& cache = profile_manager->GetProfileInfoCache();
+ ProfileAttributesStorage& storage =
+ profile_manager->GetProfileAttributesStorage();
base::FilePath path_profile1 = current_profile->GetPath();
base::FilePath user_dir = cache.GetUserDataDir();
@@ -123,7 +127,7 @@ IN_PROC_BROWSER_TEST_F(ProfileListDesktopBrowserTest, MAYBE_SwitchToProfile) {
content::RunMessageLoop();
ASSERT_EQ(cache.GetNumberOfProfiles(), 2U);
- scoped_ptr<AvatarMenu> menu = CreateAvatarMenu(&cache);
+ scoped_ptr<AvatarMenu> menu = CreateAvatarMenu(&storage);
menu->RebuildMenu();
BrowserList* browser_list = BrowserList::GetInstance();
EXPECT_EQ(1U, browser_list->size());
« no previous file with comments | « chrome/browser/profiles/avatar_menu.cc ('k') | chrome/browser/profiles/profile_list_desktop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698