| Index: chrome/browser/profiles/profile_info_util.h
|
| diff --git a/chrome/browser/profiles/profile_info_util.h b/chrome/browser/profiles/profile_info_util.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fb328e96586e11d83e014691615b73d58b7f662f
|
| --- /dev/null
|
| +++ b/chrome/browser/profiles/profile_info_util.h
|
| @@ -0,0 +1,44 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_
|
| +#define CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_
|
| +#pragma once
|
| +
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/string16.h"
|
| +#include "chrome/browser/profiles/profile_info_entry.h"
|
| +
|
| +namespace profiles {
|
| +
|
| +// Gets the number of default avatar icons that exist.
|
| +size_t GetDefaultAvatarIconCount();
|
| +
|
| +// Gets the resource ID of the default avatar icon at |index|.
|
| +int GetDefaultAvatarIconResourceIDAtIndex(size_t index);
|
| +
|
| +// Returns a URL for the default avatar icon with specified index.
|
| +std::string GetDefaultAvatarIconUrl(size_t index);
|
| +
|
| +// Checks if the given URL points to one of the default avatar icons. If it
|
| +// is, returns true and its index through |icon_index|. If not, returns false.
|
| +bool IsDefaultAvatarIconUrl(const std::string& icon_url, size_t *icon_index);
|
| +
|
| +// Returns unique name that can be assigned to a newly created profile.
|
| +// The name is based on the given icon.
|
| +string16 ChooseNameForNewProfile(const std::vector<ProfileInfoEntry>& entries,
|
| + size_t icon_index);
|
| +
|
| +// Returns an avatar icon index that can be assigned to a newly created
|
| +// profile. Note that the icon may not be unique since there are a limited
|
| +// set of default icons.
|
| +size_t ChooseAvatarIconIndexForNewProfile(
|
| + const std::vector<ProfileInfoEntry>& entries);
|
| +
|
| +} // namespace profiles
|
| +
|
| +#endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_
|
|
|