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

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

Issue 8539043: Refactor ProfileInfoCache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_
7 #pragma once
8
9 #include <string>
10 #include <vector>
11
12 #include "base/basictypes.h"
13 #include "base/string16.h"
14 #include "chrome/browser/profiles/profile_info_entry.h"
15
16 namespace profiles {
17
18 // Gets the number of default avatar icons that exist.
19 size_t GetDefaultAvatarIconCount();
20
21 // Gets the resource ID of the default avatar icon at |index|.
22 int GetDefaultAvatarIconResourceIDAtIndex(size_t index);
23
24 // Returns a URL for the default avatar icon with specified index.
25 std::string GetDefaultAvatarIconUrl(size_t index);
26
27 // Checks if the given URL points to one of the default avatar icons. If it
28 // is, returns true and its index through |icon_index|. If not, returns false.
29 bool IsDefaultAvatarIconUrl(const std::string& icon_url, size_t *icon_index);
30
31 // Returns unique name that can be assigned to a newly created profile.
32 // The name is based on the given icon.
33 string16 ChooseNameForNewProfile(const std::vector<ProfileInfoEntry>& entries,
34 size_t icon_index);
35
36 // Returns an avatar icon index that can be assigned to a newly created
37 // profile. Note that the icon may not be unique since there are a limited
38 // set of default icons.
39 size_t ChooseAvatarIconIndexForNewProfile(
40 const std::vector<ProfileInfoEntry>& entries);
41
42 } // namespace profiles
43
44 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_info_interface.h ('k') | chrome/browser/profiles/profile_info_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698