diff options
author | Chris Masone <cmasone@chromium.org> | 2011-08-22 17:43:45 -0700 |
---|---|---|
committer | Chris Masone <cmasone@chromium.org> | 2011-08-23 20:06:43 -0700 |
commit | 6402e501258c9f64373dcd05271c6c7dd75e20bc (patch) | |
tree | a70ba91a9b13edcf9ae9f5aa0d5410a0511b9874 /profile.h | |
parent | d204580706230699a7b53610cec340e399e085f1 (diff) | |
download | shill-6402e501258c9f64373dcd05271c6c7dd75e20bc.tar.gz |
[shill] Provide a cmd line toggle between flimflam and shill storage dirs
This is so that we can easily switch to (and away from) using
the flimflam profile dir (and user profile dirs) when we start shill.
BUG=chromium-os:17253
TEST=unit
Change-Id: I9352cf5c40a8f77bcda8cdc0b5912782b4e342ed
Reviewed-on: http://gerrit.chromium.org/gerrit/6454
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Diffstat (limited to 'profile.h')
-rw-r--r-- | profile.h | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -40,13 +40,11 @@ class Profile : public base::RefCounted<Profile> { std::string identifier; }; - static const char kGlobalStorageDir[]; - static const char kUserStorageDirFormat[]; - Profile(ControlInterface *control_interface, GLib *glib, Manager *manager, const Identifier &name, + const std::string &user_storage_format, bool connect_to_rpc); virtual ~Profile(); @@ -89,10 +87,12 @@ class Profile : public base::RefCounted<Profile> { static bool ParseIdentifier(const std::string &raw, Identifier *parsed); // Sets |path| to the persistent store file path for a profile identified by - // |identifier|. Returns true on success, and false if unable to determine an - // appropriate file location. |identifier| must be a valid identifier, + // |name_|. Returns true on success, and false if unable to determine an + // appropriate file location. |name_| must be a valid identifier, // possibly parsed and validated through Profile::ParseIdentifier. - static bool GetStoragePath(const Identifier &identifier, FilePath *path); + // + // In the default implementation, |name_.user| cannot be empty. + virtual bool GetStoragePath(FilePath *path); protected: Manager *manager_; @@ -127,6 +127,9 @@ class Profile : public base::RefCounted<Profile> { // Persistent store associated with the profile. KeyFileStore storage_; + // Format string used to generate paths to user profile directories. + const std::string storage_format_; + scoped_ptr<ProfileAdaptorInterface> adaptor_; DISALLOW_COPY_AND_ASSIGN(Profile); |