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

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

Issue 813133003: New Profile metric for Auth Errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android and Windows compiler errors Created 6 years 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 (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>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "chrome/browser/profiles/profile_info_cache_observer.h" 18 #include "chrome/browser/profiles/profile_info_cache_observer.h"
19 #include "chrome/browser/profiles/profile_info_interface.h" 19 #include "chrome/browser/profiles/profile_info_interface.h"
20 #include "google_apis/gaia/google_service_auth_error.h"
20 21
21 namespace gfx { 22 namespace gfx {
22 class Image; 23 class Image;
23 } 24 }
24 25
25 namespace base { 26 namespace base {
26 class DictionaryValue; 27 class DictionaryValue;
27 } 28 }
28 29
29 class PrefService; 30 class PrefService;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 bool IsUsingGAIAPictureOfProfileAtIndex(size_t index) const override; 79 bool IsUsingGAIAPictureOfProfileAtIndex(size_t index) const override;
79 bool ProfileIsSupervisedAtIndex(size_t index) const override; 80 bool ProfileIsSupervisedAtIndex(size_t index) const override;
80 bool ProfileIsChildAtIndex(size_t index) const override; 81 bool ProfileIsChildAtIndex(size_t index) const override;
81 bool ProfileIsLegacySupervisedAtIndex(size_t index) const override; 82 bool ProfileIsLegacySupervisedAtIndex(size_t index) const override;
82 bool IsOmittedProfileAtIndex(size_t index) const override; 83 bool IsOmittedProfileAtIndex(size_t index) const override;
83 bool ProfileIsSigninRequiredAtIndex(size_t index) const override; 84 bool ProfileIsSigninRequiredAtIndex(size_t index) const override;
84 std::string GetSupervisedUserIdOfProfileAtIndex(size_t index) const override; 85 std::string GetSupervisedUserIdOfProfileAtIndex(size_t index) const override;
85 bool ProfileIsEphemeralAtIndex(size_t index) const override; 86 bool ProfileIsEphemeralAtIndex(size_t index) const override;
86 bool ProfileIsUsingDefaultNameAtIndex(size_t index) const override; 87 bool ProfileIsUsingDefaultNameAtIndex(size_t index) const override;
87 bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const override; 88 bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const override;
89 GoogleServiceAuthError::State ProfileAuthErrorAtIndex(size_t index) const;
noms (inactive) 2014/12/19 19:33:01 I think this should be GetProfileAuthErrorAtIndex
Mike Lerman 2014/12/19 19:53:18 Done.
88 90
89 size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const; 91 size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const;
90 92
91 void SetProfileActiveTimeAtIndex(size_t index); 93 void SetProfileActiveTimeAtIndex(size_t index);
92 // Warning: This will re-sort profiles and thus may change indices! 94 // Warning: This will re-sort profiles and thus may change indices!
93 void SetNameOfProfileAtIndex(size_t index, const base::string16& name); 95 void SetNameOfProfileAtIndex(size_t index, const base::string16& name);
94 void SetShortcutNameOfProfileAtIndex(size_t index, 96 void SetShortcutNameOfProfileAtIndex(size_t index,
95 const base::string16& name); 97 const base::string16& name);
96 void SetUserNameOfProfileAtIndex(size_t index, 98 void SetUserNameOfProfileAtIndex(size_t index,
97 const base::string16& user_name); 99 const base::string16& user_name);
98 void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index); 100 void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index);
99 void SetIsOmittedProfileAtIndex(size_t index, bool is_omitted); 101 void SetIsOmittedProfileAtIndex(size_t index, bool is_omitted);
100 void SetSupervisedUserIdOfProfileAtIndex(size_t index, const std::string& id); 102 void SetSupervisedUserIdOfProfileAtIndex(size_t index, const std::string& id);
101 void SetLocalAuthCredentialsOfProfileAtIndex(size_t index, 103 void SetLocalAuthCredentialsOfProfileAtIndex(size_t index,
102 const std::string& auth); 104 const std::string& auth);
103 void SetBackgroundStatusOfProfileAtIndex(size_t index, 105 void SetBackgroundStatusOfProfileAtIndex(size_t index,
104 bool running_background_apps); 106 bool running_background_apps);
105 // Warning: This will re-sort profiles and thus may change indices! 107 // Warning: This will re-sort profiles and thus may change indices!
106 void SetGAIANameOfProfileAtIndex(size_t index, const base::string16& name); 108 void SetGAIANameOfProfileAtIndex(size_t index, const base::string16& name);
107 // Warning: This will re-sort profiles and thus may change indices! 109 // Warning: This will re-sort profiles and thus may change indices!
108 void SetGAIAGivenNameOfProfileAtIndex(size_t index, 110 void SetGAIAGivenNameOfProfileAtIndex(size_t index,
109 const base::string16& name); 111 const base::string16& name);
110 void SetGAIAPictureOfProfileAtIndex(size_t index, const gfx::Image* image); 112 void SetGAIAPictureOfProfileAtIndex(size_t index, const gfx::Image* image);
111 void SetIsUsingGAIAPictureOfProfileAtIndex(size_t index, bool value); 113 void SetIsUsingGAIAPictureOfProfileAtIndex(size_t index, bool value);
112 void SetProfileSigninRequiredAtIndex(size_t index, bool value); 114 void SetProfileSigninRequiredAtIndex(size_t index, bool value);
113 void SetProfileIsEphemeralAtIndex(size_t index, bool value); 115 void SetProfileIsEphemeralAtIndex(size_t index, bool value);
114 void SetProfileIsUsingDefaultNameAtIndex(size_t index, bool value); 116 void SetProfileIsUsingDefaultNameAtIndex(size_t index, bool value);
115 void SetProfileIsUsingDefaultAvatarAtIndex(size_t index, bool value); 117 void SetProfileIsUsingDefaultAvatarAtIndex(size_t index, bool value);
118 void SetProfileAuthErrorAtIndex(size_t index,
119 GoogleServiceAuthError::State value);
116 120
117 // Determines whether |name| is one of the default assigned names. 121 // Determines whether |name| is one of the default assigned names.
118 bool IsDefaultProfileName(const base::string16& name) const; 122 bool IsDefaultProfileName(const base::string16& name) const;
119 123
120 // Returns unique name that can be assigned to a newly created profile. 124 // Returns unique name that can be assigned to a newly created profile.
121 base::string16 ChooseNameForNewProfile(size_t icon_index) const; 125 base::string16 ChooseNameForNewProfile(size_t icon_index) const;
122 126
123 // Returns an avatar icon index that can be assigned to a newly created 127 // Returns an avatar icon index that can be assigned to a newly created
124 // profile. Note that the icon may not be unique since there are a limited 128 // profile. Note that the icon may not be unique since there are a limited
125 // set of default icons. 129 // set of default icons.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // This prevents a picture from being downloaded multiple times. The 228 // This prevents a picture from being downloaded multiple times. The
225 // ProfileAvatarDownloader instances are deleted when the download completes 229 // ProfileAvatarDownloader instances are deleted when the download completes
226 // or when the ProfileInfoCache is destroyed. 230 // or when the ProfileInfoCache is destroyed.
227 mutable std::map<std::string, ProfileAvatarDownloader*> 231 mutable std::map<std::string, ProfileAvatarDownloader*>
228 avatar_images_downloads_in_progress_; 232 avatar_images_downloads_in_progress_;
229 233
230 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); 234 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache);
231 }; 235 };
232 236
233 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ 237 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_info_cache.cc » ('j') | chrome/browser/profiles/profile_info_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698