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

Side by Side Diff: chrome/browser/profiles/profile_info_cache.h

Issue 12033021: Add UMA metrics and histograms for locally managed users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | 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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 20 matching lines...) Expand all
31 31
32 // This class saves various information about profiles to local preferences. 32 // This class saves various information about profiles to local preferences.
33 // This cache can be used to display a list of profiles without having to 33 // This cache can be used to display a list of profiles without having to
34 // actually load the profiles from disk. 34 // actually load the profiles from disk.
35 class ProfileInfoCache : public ProfileInfoInterface, 35 class ProfileInfoCache : public ProfileInfoInterface,
36 public base::SupportsWeakPtr<ProfileInfoCache> { 36 public base::SupportsWeakPtr<ProfileInfoCache> {
37 public: 37 public:
38 ProfileInfoCache(PrefService* prefs, const FilePath& user_data_dir); 38 ProfileInfoCache(PrefService* prefs, const FilePath& user_data_dir);
39 virtual ~ProfileInfoCache(); 39 virtual ~ProfileInfoCache();
40 40
41 // This |is_managed| refers to local management (formerly "managed mode"),
42 // not enterprise management.
41 void AddProfileToCache(const FilePath& profile_path, 43 void AddProfileToCache(const FilePath& profile_path,
42 const string16& name, 44 const string16& name,
43 const string16& username, 45 const string16& username,
44 size_t icon_index, 46 size_t icon_index,
45 bool is_managed); 47 bool is_managed);
46 void DeleteProfileFromCache(const FilePath& profile_path); 48 void DeleteProfileFromCache(const FilePath& profile_path);
47 49
48 // ProfileInfoInterface: 50 // ProfileInfoInterface:
49 virtual size_t GetNumberOfProfiles() const OVERRIDE; 51 virtual size_t GetNumberOfProfiles() const OVERRIDE;
50 // Don't cache this value and reuse, because resorting the menu could cause 52 // Don't cache this value and reuse, because resorting the menu could cause
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // to be mutable. 171 // to be mutable.
170 mutable std::map<std::string, gfx::Image*> gaia_pictures_; 172 mutable std::map<std::string, gfx::Image*> gaia_pictures_;
171 // Marks a gaia profile picture as loading. This prevents a picture from 173 // Marks a gaia profile picture as loading. This prevents a picture from
172 // loading multiple times. 174 // loading multiple times.
173 mutable std::map<std::string, bool> gaia_pictures_loading_; 175 mutable std::map<std::string, bool> gaia_pictures_loading_;
174 176
175 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); 177 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache);
176 }; 178 };
177 179
178 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ 180 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/url_blacklist_manager.cc ('k') | chrome/browser/profiles/profile_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698