Index: chrome/browser/profiles/profile_info_cache.h |
diff --git a/chrome/browser/profiles/profile_info_cache.h b/chrome/browser/profiles/profile_info_cache.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fff22ca052ca6097b69f2d18ded384f94e505fb5 |
--- /dev/null |
+++ b/chrome/browser/profiles/profile_info_cache.h |
@@ -0,0 +1,51 @@ |
+// 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_CACHE_H_ |
+#define CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ |
+#pragma once |
+ |
+#include "base/file_path.h" |
+ |
+namespace gfx { |
+class Image; |
+} |
+ |
+class DictionaryValue; |
+ |
+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.
|
+ public: |
+ explicit ProfileInfoCache(const FilePath& user_data_dir); |
+ |
+ void AddProfileToCache(const FilePath& profile_path, |
+ string16 name, |
+ size_t icon_index); |
+ void DeleteProfileFromCache(const FilePath& profile_path); |
+ |
+ size_t GetNumberOfProfiles() const; |
+ 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.
|
+ FilePath GetPathOfProfileAtIndex(size_t index) const; |
+ const gfx::Image& GetAvatarIconOfProfileAtIndex(size_t index) const; |
+ |
+ void SetNameOfProfileAtIndex(size_t index, string16 name); |
+ void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index); |
+ |
+ static size_t GetDefaultAvatarIconCount(); |
+ 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.
|
+ |
+ private: |
+ const DictionaryValue* GetInfoForProfileAtIndex(size_t index) const; |
+ 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.
|
+ std::string CacheKeyFromProfilePath(const FilePath& profile_path) const; |
+ std::vector<std::string>::iterator FindPositionForProfile( |
+ 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.
|
+ 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.
|
+ |
+ 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.
|
+ FilePath user_data_dir_; |
+ |
+ 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.
|
+}; |
+ |
+#endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ |