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

Unified Diff: chromeos/network/network_state_handler.h

Issue 2819993002: [CrOS Tether] Add the notion of a tether DeviceState. (Closed)
Patch Set: stevenjb@ comment. Created 3 years, 8 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/network_connection_handler.cc ('k') | chromeos/network/network_state_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_state_handler.h
diff --git a/chromeos/network/network_state_handler.h b/chromeos/network/network_state_handler.h
index 3265b00141c167c6fb162db3ff6a8bcd7cd1ba88..b35887bd5aa6f0629d9fa06fe540d20476548414 100644
--- a/chromeos/network/network_state_handler.h
+++ b/chromeos/network/network_state_handler.h
@@ -112,6 +112,17 @@ class CHROMEOS_EXPORT NetworkStateHandler
bool enabled,
const network_handler::ErrorCallback& error_callback);
+ // Sets the tether technology state. Because Tether networks do not represent
+ // real Shill networks, this value must be set by the tether component rather
+ // than being generated by Shill. See TetherDeviceStateManager for more
+ // details.
+ void SetTetherTechnologyState(TechnologyState technology_state);
+
+ // Sets the scanning state of the tether technology. Since tether network
+ // scans are not actually performed as part of Shill, this value must be set
+ // by the tether component.
+ void SetTetherScanState(bool is_scanning);
+
// Asynchronously sets the list of prohibited technologies. The accepted
// values are the shill network technology identifiers. See also
// chromeos::onc::Validator::ValidateGlobalNetworkConfiguration().
@@ -250,7 +261,9 @@ class CHROMEOS_EXPORT NetworkStateHandler
DeviceStateList* list) const;
// Requests a network scan. This may trigger updates to the network
- // list, which will trigger the appropriate observer calls.
+ // list, which will trigger the appropriate observer calls. Note that this
+ // function does not request a tether scan.
+ // TODO(khorimoto): Add ability to request a tether scan as well.
void RequestScan() const;
// Requests an update for an existing NetworkState, e.g. after configuring
@@ -259,7 +272,7 @@ class CHROMEOS_EXPORT NetworkStateHandler
// acknowledged it (e.g. in the callback of a SetProperties).
// When the properties are received, NetworkPropertiesUpdated will be
// signaled for each member of |observers_|, regardless of whether any
- // properties actually changed.
+ // properties actually changed. Note that this is a no-op for Tether networks.
void RequestUpdateForNetwork(const std::string& service_path);
// Informs NetworkStateHandler to notify observers that the properties for
@@ -452,6 +465,11 @@ class CHROMEOS_EXPORT NetworkStateHandler
const std::string& guid,
const std::string& connection_state);
+ // Ensures that the Tether DeviceState is present in |device_list_| if
+ // |tether_technology_state_| is not TECHNOLOGY_UNAVAILABLE and ensures that
+ // it is not present in |device_list_| if it is TECHNOLOGY_UNAVAILABLE.
+ void EnsureTetherDeviceState();
+
// Shill property handler instance, owned by this class.
std::unique_ptr<internal::ShillPropertyHandler> shill_property_handler_;
@@ -482,6 +500,11 @@ class CHROMEOS_EXPORT NetworkStateHandler
// NetworkState that is not saved in a profile.
SpecifierGuidMap specifier_guid_map_;
+ // The state corresponding to the tether device type. This value is managed by
+ // the tether component.
+ TechnologyState tether_technology_state_ =
+ TechnologyState::TECHNOLOGY_UNAVAILABLE;
+
// Ensure that Shutdown() gets called exactly once.
bool did_shutdown_ = false;
« no previous file with comments | « chromeos/network/network_connection_handler.cc ('k') | chromeos/network/network_state_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698