summaryrefslogtreecommitdiff
path: root/profile.h
diff options
context:
space:
mode:
authormukesh agrawal <quiche@chromium.org>2014-04-24 19:10:46 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-04-26 00:56:59 +0000
commit0a59a5a484634f798222ad077dbbfa7faa76651d (patch)
tree0bcca43034de628ccb0837a68b9116d826367782 /profile.h
parent2e84b4aef602f500c7c9935dacee4f21c138d2d3 (diff)
downloadshill-0a59a5a484634f798222ad077dbbfa7faa76651d.tar.gz
shill: stop passing around format strings for profiles
Prior to this CL, shill passed around format strings, to specify where the user profiles should be stored. While this makes things more configurable, it also a) makes things more complex, and b) causes g++ to emit warnings that some format strings can't be checked statically. The location of user profiles doesn't need the full power of printf-format style configurability. We really only need the ability to specify which directory the user profiles are stored in. Note that this changes requires updating some unit tests, which actually did take advantage of the flexibility. In particular, some of the Manager and Profile unit tests placed user profiles directly in a user profile directory, rather than creating a user-specific sub-directory first. Creating the user-specific directories seems like the right thing to do, since that it what the normal (non-test) code does. BUG=chromium:293668 TEST=unit tests Change-Id: Ic1afeec84a7797105c9a49b8261a9677e17d91ee Reviewed-on: https://chromium-review.googlesource.com/197061 Tested-by: mukesh agrawal <quiche@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Queue: mukesh agrawal <quiche@chromium.org>
Diffstat (limited to 'profile.h')
-rw-r--r--profile.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/profile.h b/profile.h
index 7c7e1479..8c390ef3 100644
--- a/profile.h
+++ b/profile.h
@@ -10,6 +10,7 @@
#include <vector>
#include <base/memory/scoped_ptr.h>
+#include <base/files/file_path.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
#include "shill/event_dispatcher.h"
@@ -60,7 +61,7 @@ class Profile : public base::RefCounted<Profile> {
Metrics *metrics,
Manager *manager,
const Identifier &name,
- const std::string &user_storage_format,
+ const std::string &user_storage_directory,
bool connect_to_rpc);
virtual ~Profile();
@@ -223,8 +224,8 @@ class Profile : public base::RefCounted<Profile> {
// Properties to be gotten via PropertyStore calls.
Identifier name_;
- // Format string used to generate paths to user profile directories.
- const std::string storage_format_;
+ // Path to user profile directory.
+ const base::FilePath storage_path_;
// Allows this profile to be backed with on-disk storage.
scoped_ptr<StoreInterface> storage_;