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.
5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_
8 #include "base/file_path.h"
9 #include "base/string16.h"
15 // This abstract interface is used to query the profiles backend for information
16 // about the different profiles. Its sole concrete implementation is the
17 // ProfileInfoCache. This interface exists largely to assist in testing.
18 class ProfileInfoInterface
{
20 virtual size_t GetNumberOfProfiles() const = 0;
22 virtual size_t GetIndexOfProfileWithPath(
23 const FilePath
& profile_path
) const = 0;
25 virtual string16
GetNameOfProfileAtIndex(size_t index
) const = 0;
27 virtual string16
GetShortcutNameOfProfileAtIndex(size_t index
) const = 0;
29 virtual FilePath
GetPathOfProfileAtIndex(size_t index
) const = 0;
31 virtual string16
GetUserNameOfProfileAtIndex(size_t index
) const = 0;
33 virtual const gfx::Image
& GetAvatarIconOfProfileAtIndex(
34 size_t index
) const = 0;
36 // Returns true if the profile at the given index is currently running any
38 virtual bool GetBackgroundStatusOfProfileAtIndex(
39 size_t index
) const = 0;
41 virtual string16
GetGAIANameOfProfileAtIndex(size_t index
) const = 0;
43 // Checks if the GAIA name should be used as the profile's name.
44 virtual bool IsUsingGAIANameOfProfileAtIndex(size_t index
) const = 0;
46 virtual const gfx::Image
* GetGAIAPictureOfProfileAtIndex(
47 size_t index
) const = 0;
49 // Checks if the GAIA picture should be used as the profile's avatar icon.
50 virtual bool IsUsingGAIAPictureOfProfileAtIndex(size_t index
) const = 0;
53 virtual ~ProfileInfoInterface() {}
56 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_