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

Unified Diff: chrome/browser/profile_manager.h

Issue 3075022: Delete AvailableProfile (et al.) in browser/profile_manager.*. (Closed)
Patch Set: Created 10 years, 4 months 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 | « no previous file | chrome/browser/profile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile_manager.h
diff --git a/chrome/browser/profile_manager.h b/chrome/browser/profile_manager.h
index fae0b896d2070fa8f4904e5b2fc363ae4f48d3ee..60ab311258ec431a60a9c0b93e01cb0fdb713dcf 100644
--- a/chrome/browser/profile_manager.h
+++ b/chrome/browser/profile_manager.h
@@ -22,49 +22,6 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
-// This is a small storage class that simply represents some metadata about
-// profiles that are available in the current user data directory.
-// These are cached in local state so profiles don't need to be scanned
-// for their metadata on every launch.
-class AvailableProfile {
- public:
- AvailableProfile(const std::wstring& name,
- const std::wstring& id,
- const FilePath& directory)
- : name_(name), id_(id), directory_(directory) {}
-
- // Decodes a DictionaryValue into an AvailableProfile
- static AvailableProfile* FromValue(DictionaryValue* value) {
- DCHECK(value);
- std::wstring name, id;
- FilePath::StringType directory;
- value->GetString(L"name", &name);
- value->GetString(L"id", &id);
- value->GetString(L"directory", &directory);
- return new AvailableProfile(name, id, FilePath(directory));
- }
-
- // Encodes this AvailableProfile into a new DictionaryValue
- DictionaryValue* ToValue() {
- DictionaryValue* value = new DictionaryValue;
- value->SetString(L"name", name_);
- value->SetString(L"id", id_);
- value->SetString(L"directory", directory_.value());
- return value;
- }
-
- std::wstring name() const { return name_; }
- std::wstring id() const { return id_; }
- FilePath directory() const { return directory_; }
-
- private:
- std::wstring name_; // User-visible profile name
- std::wstring id_; // Profile identifier
- FilePath directory_; // Subdirectory containing profile (not full path)
-
- DISALLOW_COPY_AND_ASSIGN(AvailableProfile);
-};
-
class ProfileManager : public NonThreadSafe,
public SystemMonitor::PowerObserver,
public NotificationObserver {
@@ -112,8 +69,6 @@ class ProfileManager : public NonThreadSafe,
iterator end() { return profiles_.end(); }
const_iterator end() const { return profiles_.end(); }
- typedef std::vector<AvailableProfile*> AvailableProfileVector;
-
// PowerObserver notifications
void OnSuspend();
void OnResume();
@@ -129,7 +84,7 @@ class ProfileManager : public NonThreadSafe,
// user data directory.
static FilePath GetDefaultProfileDir(const FilePath& user_data_dir);
-// Returns the path to the preferences file given the user profile directory.
+ // Returns the path to the preferences file given the user profile directory.
static FilePath GetProfilePrefsPath(const FilePath& profile_dir);
// Tries to determine whether the given path represents a profile
@@ -162,8 +117,6 @@ class ProfileManager : public NonThreadSafe,
// because we expect there to be a small number of profiles active.
ProfileVector profiles_;
- AvailableProfileVector available_profiles_;
-
NotificationRegistrar registrar_;
// Indicates that a user has logged in and that the profile specified
« no previous file with comments | « no previous file | chrome/browser/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698