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_ENTRY_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_ENTRY_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/string16.h" |
| 10 #include "base/file_path.h" |
| 11 |
| 12 namespace base { |
| 13 class DictionaryValue; |
| 14 } |
| 15 namespace gfx { |
| 16 class Image; |
| 17 } |
| 18 |
| 19 // This class caches information about a single profile. |
| 20 class ProfileInfoEntry { |
| 21 public: |
| 22 ProfileInfoEntry(); |
| 23 ProfileInfoEntry(const ProfileInfoEntry& entry); |
| 24 explicit ProfileInfoEntry(const FilePath& path, |
| 25 const base::DictionaryValue& info); |
| 26 |
| 27 ProfileInfoEntry& operator=(const ProfileInfoEntry& entry); |
| 28 bool operator<(const ProfileInfoEntry& rhs) const; |
| 29 |
| 30 // Caller takes ownership of the returned dictionary. |
| 31 base::DictionaryValue* GetEntryAsDictionary() const; |
| 32 |
| 33 const FilePath& path() const { return path_; } |
| 34 void set_path(const FilePath& path) { path_ = path; } |
| 35 |
| 36 const string16& name() const { return name_; } |
| 37 void set_name(const string16& name) { name_ = name; } |
| 38 |
| 39 const string16& user_name() const { return user_name_; } |
| 40 void set_user_name(const string16& user_name) { user_name_ = user_name; } |
| 41 |
| 42 size_t icon_index() const { return icon_index_; } |
| 43 void set_icon_index(size_t index) { icon_index_ = index; } |
| 44 |
| 45 bool is_running_background_apps() const { |
| 46 return is_running_background_apps_; |
| 47 } |
| 48 void set_is_running_background_apps(bool flag) { |
| 49 is_running_background_apps_ = flag; |
| 50 } |
| 51 |
| 52 const gfx::Image& GetIcon() const; |
| 53 |
| 54 private: |
| 55 FilePath path_; |
| 56 string16 name_; |
| 57 string16 user_name_; |
| 58 size_t icon_index_; |
| 59 bool is_running_background_apps_; |
| 60 }; |
| 61 |
| 62 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_ENTRY_H_ |
OLD | NEW |