summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/profile_manager.cc6
-rw-r--r--chrome/browser/profile_manager.h49
2 files changed, 1 insertions, 54 deletions
diff --git a/chrome/browser/profile_manager.cc b/chrome/browser/profile_manager.cc
index 15533bb..9eae3f5 100644
--- a/chrome/browser/profile_manager.cc
+++ b/chrome/browser/profile_manager.cc
@@ -71,12 +71,6 @@ ProfileManager::~ProfileManager() {
for (const_iterator i(begin()); i != end(); ++i)
delete *i;
profiles_.clear();
-
- // Get rid of available profile list
- for (AvailableProfileVector::const_iterator i(available_profiles_.begin());
- i != available_profiles_.end(); ++i)
- delete *i;
- available_profiles_.clear();
}
FilePath ProfileManager::GetDefaultProfileDir(
diff --git a/chrome/browser/profile_manager.h b/chrome/browser/profile_manager.h
index fae0b89..60ab311 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