OLD | NEW |
---|---|
(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_CACHE_H_ | |
6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ | |
7 #pragma once | |
8 | |
9 #include "base/file_path.h" | |
10 | |
11 namespace gfx { | |
12 class Image; | |
13 } | |
14 | |
15 class DictionaryValue; | |
16 | |
17 class ProfileInfoCache { | |
Miranda Callahan
2011/06/15 15:16:08
Could you add a class comment here about why this
sail
2011/06/21 03:26:53
Done.
| |
18 public: | |
19 explicit ProfileInfoCache(const FilePath& user_data_dir); | |
20 | |
21 void AddProfileToCache(const FilePath& profile_path, | |
22 string16 name, | |
23 size_t icon_index); | |
24 void DeleteProfileFromCache(const FilePath& profile_path); | |
25 | |
26 size_t GetNumberOfProfiles() const; | |
27 string16 GetNameOfProfileAtIndex(size_t index) const; | |
willchan no longer on Chromium
2011/06/15 11:22:12
#include "base/string16.h"
sail
2011/06/21 03:26:53
Done.
| |
28 FilePath GetPathOfProfileAtIndex(size_t index) const; | |
29 const gfx::Image& GetAvatarIconOfProfileAtIndex(size_t index) const; | |
30 | |
31 void SetNameOfProfileAtIndex(size_t index, string16 name); | |
32 void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index); | |
33 | |
34 static size_t GetDefaultAvatarIconCount(); | |
35 static int GetDefaultAvatarIconResourceIDAtIndex(size_t index); | |
Miranda Callahan
2011/06/15 15:16:08
Many of these method names are obvious, but I thin
sail
2011/06/21 03:26:53
Done.
| |
36 | |
37 private: | |
38 const DictionaryValue* GetInfoForProfileAtIndex(size_t index) const; | |
39 void SetInfoForProfileAtIndex(size_t index, DictionaryValue* info); | |
Miranda Callahan
2011/06/15 15:16:08
Could you describe what values are supposed to be
sail
2011/06/21 03:26:53
Done.
| |
40 std::string CacheKeyFromProfilePath(const FilePath& profile_path) const; | |
41 std::vector<std::string>::iterator FindPositionForProfile( | |
42 std::string search_key, | |
willchan no longer on Chromium
2011/06/15 11:22:12
const std::string&
sail
2011/06/21 03:26:53
Done.
| |
43 string16 search_name); | |
willchan no longer on Chromium
2011/06/15 11:22:12
const std::string&
sail
2011/06/21 03:26:53
Done.
| |
44 | |
45 std::vector<std::string> sorted_keys_; | |
willchan no longer on Chromium
2011/06/15 11:22:12
#include <string>
#include <vector>
sail
2011/06/21 03:26:53
Done.
| |
46 FilePath user_data_dir_; | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); | |
willchan no longer on Chromium
2011/06/15 11:22:12
#include "base/basictypes.h"
sail
2011/06/21 03:26:53
Done.
| |
49 }; | |
50 | |
51 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ | |
OLD | NEW |