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

Unified Diff: chromeos/network/network_state_handler.h

Issue 2852693004: [CrOS Tether] Create HostScanCache, which caches scan results and inserts them into the network sta… (Closed)
Patch Set: Fixed comment, added tests for TestHostResponseRecorder::Observer. 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
Index: chromeos/network/network_state_handler.h
diff --git a/chromeos/network/network_state_handler.h b/chromeos/network/network_state_handler.h
index b35887bd5aa6f0629d9fa06fe540d20476548414..9e9e4a7d84006fabd7ce1b46bf65b00404656035 100644
--- a/chromeos/network/network_state_handler.h
+++ b/chromeos/network/network_state_handler.h
@@ -209,13 +209,12 @@ class CHROMEOS_EXPORT NetworkStateHandler
// network. The |guid| provided must be non-empty. If a network with |guid|
// already exists, this method will do nothing. Use the provided |guid| to
// refer to and fetch this NetworkState in the future.
- // NOTE: only GetNetworkStateFromGuid is supported to fetch "tether"
- // NetworkStates.
void AddTetherNetworkState(const std::string& guid,
const std::string& name,
const std::string& carrier,
int battery_percentage,
- int signal_strength);
+ int signal_strength,
+ bool has_connected_to_host);
Ryan Hansberry 2017/04/28 22:31:04 Please explain this argument in the documentation,
Kyle Horimoto 2017/04/28 22:45:04 Changed the description. We talked about this nam
// Updates the tether properties (carrier, battery percentage, and signal
// strength) for a network which has already been added via
@@ -225,9 +224,16 @@ class CHROMEOS_EXPORT NetworkStateHandler
int battery_percentage,
int signal_strength);
+ // Updates the HasConnectedToHost property of the Tether network with GUID
+ // |guid| to true. If no network with GUID |guid| is registered or if the
+ // network is registered and its HasConnectedToHost value was already true,
Ryan Hansberry 2017/04/28 22:31:04 I assume this shouldn't be camel-case and should b
Kyle Horimoto 2017/04/28 22:45:04 I named it that way because this is the name of th
+ // this function does nothing. Returns whether the value was actually changed.
+ bool SetTetherNetworkHasConnectedToHost(const std::string& guid);
+
// Remove a Tether NetworkState, using the same |guid| passed to
- // AddTetherNetworkState.
- void RemoveTetherNetworkState(const std::string& guid);
+ // AddTetherNetworkState(). If no network with GUI |guid| is registered, this
+ // function does nothing. Returns whether the network was actually removed.
+ bool RemoveTetherNetworkState(const std::string& guid);
// Inform NetworkStateHandler that the provided Tether network with the
// provided guid |tether_network_guid| is associated with the Wi-Fi network

Powered by Google App Engine
This is Rietveld 408576698