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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_info_entry.h
diff --git a/chrome/browser/profiles/profile_info_entry.h b/chrome/browser/profiles/profile_info_entry.h
new file mode 100644
index 0000000000000000000000000000000000000000..f870b608ff767572749ef06ce98baa3268fd1a71
--- /dev/null
+++ b/chrome/browser/profiles/profile_info_entry.h
@@ -0,0 +1,62 @@
+// 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_ENTRY_H_
+#define CHROME_BROWSER_PROFILES_PROFILE_INFO_ENTRY_H_
+#pragma once
+
+#include "base/string16.h"
+#include "base/file_path.h"
+
+namespace base {
+class DictionaryValue;
+}
+namespace gfx {
+class Image;
+}
+
+// This class caches information about a single profile.
+class ProfileInfoEntry {
+ public:
+ ProfileInfoEntry();
+ ProfileInfoEntry(const ProfileInfoEntry& entry);
+ explicit ProfileInfoEntry(const FilePath& path,
+ const base::DictionaryValue& info);
+
+ ProfileInfoEntry& operator=(const ProfileInfoEntry& entry);
+ bool operator<(const ProfileInfoEntry& rhs) const;
+
+ // Caller takes ownership of the returned dictionary.
+ base::DictionaryValue* GetEntryAsDictionary() const;
+
+ const FilePath& path() const { return path_; }
+ void set_path(const FilePath& path) { path_ = path; }
+
+ const string16& name() const { return name_; }
+ void set_name(const string16& name) { name_ = name; }
+
+ const string16& user_name() const { return user_name_; }
+ void set_user_name(const string16& user_name) { user_name_ = user_name; }
+
+ size_t icon_index() const { return icon_index_; }
+ void set_icon_index(size_t index) { icon_index_ = index; }
+
+ bool is_running_background_apps() const {
+ return is_running_background_apps_;
+ }
+ void set_is_running_background_apps(bool flag) {
+ is_running_background_apps_ = flag;
+ }
+
+ const gfx::Image& GetIcon() const;
+
+ private:
+ FilePath path_;
+ string16 name_;
+ string16 user_name_;
+ size_t icon_index_;
+ bool is_running_background_apps_;
+};
+
+#endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_ENTRY_H_
« 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