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

Side by Side Diff: chrome/browser/chromeos/profiles/profile_list_chromeos.h

Issue 1242793005: Refactor most c/b/profiles calls to ProfileInfoCache. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows unit test and ChromeOS build Created 5 years, 5 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
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 #ifndef CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_
6 #define CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_ 6 #define CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_
7 7
8 #include "chrome/browser/profiles/profile_list.h" 8 #include "chrome/browser/profiles/profile_list.h"
9 9
10 #include <vector> 10 #include <vector>
11 11
12 class ProfileInfoInterface; 12 class ProfileAttributesStorage;
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 // This model represents profiles corresponding to logged-in ChromeOS users. 16 // This model represents profiles corresponding to logged-in ChromeOS users.
17 class ProfileListChromeOS : public ProfileList { 17 class ProfileListChromeOS : public ProfileList {
18 public: 18 public:
19 explicit ProfileListChromeOS(ProfileInfoInterface* profile_cache); 19 explicit ProfileListChromeOS(ProfileAttributesStorage* profile_storage);
20 ~ProfileListChromeOS() override; 20 ~ProfileListChromeOS() override;
21 21
22 // ProfileList overrides: 22 // ProfileList overrides:
23 size_t GetNumberOfItems() const override; 23 size_t GetNumberOfItems() const override;
24 const AvatarMenu::Item& GetItemAt(size_t index) const override; 24 const AvatarMenu::Item& GetItemAt(size_t index) const override;
25 void RebuildMenu() override; 25 void RebuildMenu() override;
26 size_t MenuIndexFromProfileIndex(size_t index) override; 26 size_t MenuIndexFromProfilePath(const base::FilePath& path) override;
27 void ActiveProfilePathChanged(base::FilePath& path) override; 27 void ActiveProfilePathChanged(base::FilePath& path) override;
28 28
29 private: 29 private:
30 void ClearMenu(); 30 void ClearMenu();
31 void SortMenu(); 31 void SortMenu();
32 32
33 // The cache that provides the profile information. Weak. 33 // The cache that provides the profile information. Weak.
34 ProfileInfoInterface* profile_info_; 34 ProfileAttributesStorage* profile_storage_;
35 35
36 // The path of the currently active profile. 36 // The path of the currently active profile.
37 base::FilePath active_profile_path_; 37 base::FilePath active_profile_path_;
38 38
39 // List of built "menu items." 39 // List of built "menu items."
40 std::vector<AvatarMenu::Item*> items_; 40 std::vector<AvatarMenu::Item*> items_;
41 41
42 DISALLOW_COPY_AND_ASSIGN(ProfileListChromeOS); 42 DISALLOW_COPY_AND_ASSIGN(ProfileListChromeOS);
43 }; 43 };
44 44
45 } // namespace chromeos 45 } // namespace chromeos
46 46
47 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_ 47 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698