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

Unified Diff: chromeos/network/network_state.h

Issue 289383004: Merge FavoriteState into NetworkState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Elim UpdateManagerProperties, feedback Created 6 years, 6 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
Index: chromeos/network/network_state.h
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
index 276c368d4aa83ac9ba1d155ede09f7282317c1d3..4bb5385dbe591ea4afbff53d12af930415bbf34b 100644
--- a/chromeos/network/network_state.h
+++ b/chromeos/network/network_state.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/values.h"
#include "chromeos/network/managed_state.h"
#include "chromeos/network/network_ui_data.h"
#include "components/onc/onc_constants.h"
@@ -45,6 +46,7 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
bool RequiresActivation() const;
// Accessors
+ bool visible() const { return visible_; }
const std::string& security() const { return security_; }
const std::string& device_path() const { return device_path_; }
const std::string& guid() const { return guid_; }
@@ -55,6 +57,7 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
void clear_last_error() { last_error_.clear(); }
const NetworkUIData& ui_data() const { return ui_data_; }
+ const base::DictionaryValue& proxy_config() const { return proxy_config_; }
// IPConfig Properties. These require an extra call to ShillIPConfigClient,
// so cache them to avoid excessively complex client code.
@@ -90,6 +93,9 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
bool IsConnectedState() const;
bool IsConnectingState() const;
+ // Returns true if this is a network stored in a profile (see note above).
pneubeck (no reviews) 2014/06/11 12:44:56 the 'see note above' doesn't apply anymore. maybe
stevenjb 2014/06/11 23:31:41 Done.
+ bool IsInProfile() const;
+
// Returns true if the network properties are stored in a user profile.
bool IsPrivate() const;
@@ -99,6 +105,11 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
// Converts the prefix length to a netmask string.
std::string GetNetmask() 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);
@@ -116,6 +127,11 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
// Returns true if |name_| changes.
bool UpdateName(const base::DictionaryValue& properties);
+ void set_visible(bool visible) { visible_ = visible; }
+
+ // Set to true if the network is a member of Manager.Services.
+ bool visible_;
+
// Network Service properties. Avoid adding any additional properties here.
// Instead use NetworkConfigurationHandler::GetProperties() to asynchronously
// request properties from Shill.
@@ -162,6 +178,10 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
// for migration to PEM.
bool has_ca_cert_nss_;
+ // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler
+ // provides proxy configuration. crbug.com/241775
+ base::DictionaryValue proxy_config_;
+
DISALLOW_COPY_AND_ASSIGN(NetworkState);
};

Powered by Google App Engine
This is Rietveld 408576698