Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: chrome/browser/profiles/profile_info_entry.h

Issue 8539043: Refactor ProfileInfoCache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.cc ('k') | chrome/browser/profiles/profile_info_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698