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_INTERFACE_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_
7 
8 #include <stddef.h>
9 
10 #include "base/files/file_path.h"
11 #include "base/strings/string16.h"
12 
13 namespace gfx {
14 class Image;
15 }
16 
17 // This abstract interface is used to query the profiles backend for information
18 // about the different profiles. Its sole concrete implementation is the
19 // ProfileInfoCache. This interface exists largely to assist in testing.
20 // The ProfileInfoInterface is being deprecated. Prefer using the
21 // ProfileAttributesStorage and avoid using the Get*AtIndex family of functions.
22 class ProfileInfoInterface {
23  public:
24   virtual size_t GetNumberOfProfiles() const = 0;
25 
26   virtual size_t GetIndexOfProfileWithPath(
27       const base::FilePath& profile_path) const = 0;
28 
29   virtual base::FilePath GetPathOfProfileAtIndex(size_t index) const = 0;
30 
31   virtual const gfx::Image* GetGAIAPictureOfProfileAtIndex(
32       size_t index) const = 0;
33 
34   // Checks if the GAIA picture should be used as the profile's avatar icon.
35   virtual bool IsUsingGAIAPictureOfProfileAtIndex(size_t index) const = 0;
36 
37   // Returns true if the user has never manually selected a profile avatar.
38   virtual bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const = 0;
39 
40  protected:
~ProfileInfoInterface()41   virtual ~ProfileInfoInterface() {}
42 };
43 
44 #endif  // CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_
45