Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: chromeos/network/favorite_state.h

Issue 275543005: Use GUID instead of ServicePath in networkingPrivate API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/client_cert_resolver.cc ('k') | chromeos/network/favorite_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/favorite_state.h
diff --git a/chromeos/network/favorite_state.h b/chromeos/network/favorite_state.h
index 349b85b8a48803bf9b5af27a54869a39ccd41af2..e68f3a33b7624c07e092b629b8cfa23e7582e7ba 100644
--- a/chromeos/network/favorite_state.h
+++ b/chromeos/network/favorite_state.h
@@ -19,9 +19,10 @@ namespace chromeos {
// networks).
// Note: NetworkStateHandler will store an entry for each member of
// Manager.ServiceCompleteList, even for visible entries that are not
-// favorites. This is necessary to avoid unnecessarily re-requesting entries,
-// and to limit the code complexity. The IsFavorite() accessor is used to skip
-// entries that are not actually favorites.
+// saved. This is necessary to avoid unnecessarily re-requesting entries,
+// and to limit the code complexity. It is also convenient for tracking the
+// complete list of "known" networks. The IsInProfile() accessor is used to
+// skip entries that are not actually saved in a profile.
class CHROMEOS_EXPORT FavoriteState : public ManagedState {
public:
explicit FavoriteState(const std::string& path);
@@ -40,16 +41,27 @@ class CHROMEOS_EXPORT FavoriteState : public ManagedState {
const std::string& guid() const { return guid_; }
// Returns true if this is a favorite stored in a profile (see note above).
- bool IsFavorite() const;
+ bool IsInProfile() const;
// Returns true if the network properties are stored in a user profile.
bool IsPrivate() const;
+ // Returns a specifier for identifying this network in the absence of a GUID.
+ // This should only be used by NetworkStateHandler for keeping track of
+ // GUIDs assigned to unsaved networks.
+ std::string GetSpecifier() const;
+
+ // Set the GUID. Called exclusively by NetworkStateHandler.
+ void SetGuid(const std::string& guid);
+
private:
std::string profile_path_;
NetworkUIData ui_data_;
std::string guid_;
+ // Keep track of Service.Security. Only used for specifying wifi networks.
+ std::string security_;
+
// TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler
// provides proxy configuration. crbug.com/241775
base::DictionaryValue proxy_config_;
« no previous file with comments | « chromeos/network/client_cert_resolver.cc ('k') | chromeos/network/favorite_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698