summaryrefslogtreecommitdiff
path: root/profile.h
diff options
context:
space:
mode:
authorChris Masone <cmasone@chromium.org>2011-08-23 20:41:00 -0700
committerChris Masone <cmasone@chromium.org>2011-08-23 21:18:29 -0700
commit2ae797d040b7261a5619c750e07037566bcb542b (patch)
tree0d790ccf7bf4dadb7d0f2e2affa51af8091ae721 /profile.h
parent7156c923c9a9d2240ea9c62045337ac8c8f89e57 (diff)
downloadshill-2ae797d040b7261a5619c750e07037566bcb542b.tar.gz
Re-land "[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: I0264162665607bb180688428c4640e42383ae355 Reviewed-on: http://gerrit.chromium.org/gerrit/6568 Reviewed-by: Chris Masone <cmasone@chromium.org> Tested-by: Chris Masone <cmasone@chromium.org>
Diffstat (limited to 'profile.h')
-rw-r--r--profile.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/profile.h b/profile.h
index 7e5b4d18..520664cc 100644
--- a/profile.h
+++ b/profile.h
@@ -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);