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

Unified Diff: chrome/browser/profiles/profile_attributes_entry.h

Issue 1631373003: Refactor ProfileInfoCache in c/b/ui/app_list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to std::cref Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_attributes_entry.h
diff --git a/chrome/browser/profiles/profile_attributes_entry.h b/chrome/browser/profiles/profile_attributes_entry.h
index 081c5c55557a49fa77cd061df1cae86cf7c506bf..bd4d33e60653aea42f56266b14559ec04aab1911 100644
--- a/chrome/browser/profiles/profile_attributes_entry.h
+++ b/chrome/browser/profiles/profile_attributes_entry.h
@@ -11,8 +11,10 @@
#include "base/files/file_path.h"
#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
+#include "third_party/icu/source/i18n/unicode/coll.h"
namespace gfx {
class Image;
@@ -22,6 +24,17 @@ class ProfileInfoCache;
class ProfileAttributesEntry {
public:
+ // Compares two ProfileAttributesEntry using locale-sensitive comparison of
+ // their names. For ties, the profile path is compared next.
+ class SortComparator {
+ public:
+ SortComparator();
+ bool operator()(const ProfileAttributesEntry* const a,
+ const ProfileAttributesEntry* const b) const;
+ private:
+ scoped_ptr<icu::Collator> collator_;
+ };
+
ProfileAttributesEntry();
virtual ~ProfileAttributesEntry() {}
@@ -39,7 +52,7 @@ class ProfileAttributesEntry {
base::string16 GetUserName() const;
// Gets the icon used as this profile's avatar. This might not be the icon
// displayed in the UI if IsUsingGAIAPicture() is true.
- const gfx::Image& GetAvatarIcon();
+ const gfx::Image& GetAvatarIcon() const;
std::string GetLocalAuthCredentials() const;
std::string GetPasswordChangeDetectionToken() const;
// Note that a return value of false could mean an error in collection or

Powered by Google App Engine
This is Rietveld 408576698