summaryrefslogtreecommitdiff
path: root/profile.h
diff options
context:
space:
mode:
authormukesh agrawal <quiche@chromium.org>2014-09-30 15:21:52 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-10-02 01:16:00 +0000
commit9842441bbfae81053a6c08045f1d7b831e5101b2 (patch)
tree25429a9c1968ec37bc9dfa638a9aabcce23f7ae6 /profile.h
parentf4365a68767063e87dc7f68ff24b6c3955e88c5d (diff)
downloadshill-9842441bbfae81053a6c08045f1d7b831e5101b2.tar.gz
shill: improve handling of profiles in WiFiProvider
Sometimes, WiFiProvider uses a default profile. Other times, WiFiProvider uses a user profile. This is all well and good, but it's hard to follow which case is which. Resolve this problem, by giving WiFiProvider explict default_profile_ and user_profile_ fields. Most existing tests were updated to explicitly use the default_profile_. While there: - Clean up how default profiles are identified. (Do this via a method in Profile, rather than a method in Manager.) - Fix a whitespace issue in wifi_provider.cc. - Remove some unused local variables in wifi_provider_unittest.cc. BUG=chromium:419152 TEST=unit tests (on peppy) Change-Id: Id1d04ad8f112ff4ee6e8d31b10413dbc1dc94350 Reviewed-on: https://chromium-review.googlesource.com/220670 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/profile.h b/profile.h
index 482fefad..26b6b19f 100644
--- a/profile.h
+++ b/profile.h
@@ -181,11 +181,17 @@ class Profile : public base::RefCounted<Profile> {
// Returns the user_hash component of the profile identifier.
const std::string &GetUserHash() const { return name_.user_hash; }
+ virtual StoreInterface *GetStorage() {
+ return storage_.get();
+ }
+
// Returns a read-only copy of the backing storage of the profile.
virtual const StoreInterface *GetConstStorage() const {
return storage_.get();
}
+ virtual bool IsDefault() const { return false; }
+
protected:
// Protected getters
Metrics *metrics() const { return metrics_; }