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

Unified Diff: chromeos/network/onc/onc_utils.cc

Issue 2836083002: [CrOS Tether] Update NetworkConfigurationHandler::GetShillProperties() to work with Tether networks. (Closed)
Patch Set: 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/onc/onc_utils.cc
diff --git a/chromeos/network/onc/onc_utils.cc b/chromeos/network/onc/onc_utils.cc
index 18154f36fe59730960d757460e342f8016765906..2d0dd33f511f80957b67b8c5926d7d5967bd20fa 100644
--- a/chromeos/network/onc/onc_utils.cc
+++ b/chromeos/network/onc/onc_utils.cc
@@ -31,7 +31,9 @@
#include "chromeos/network/onc/onc_translator.h"
#include "chromeos/network/onc/onc_utils.h"
#include "chromeos/network/onc/onc_validator.h"
+#include "chromeos/network/tether_constants.h"
#include "components/device_event_log/device_event_log.h"
+#include "components/onc/onc_constants.h"
#include "components/onc/onc_pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/proxy_config/proxy_config_dictionary.h"
@@ -1326,5 +1328,19 @@ bool HasPolicyForNetwork(const PrefService* profile_prefs,
return policy != NULL;
}
+bool IsTetherShillDictionary(const base::DictionaryValue& dict) {
+ std::string network_type;
+ return dict.GetStringWithoutPathExpansion(shill::kTypeProperty,
+ &network_type) &&
+ network_type == kTypeTether;
+}
+
+bool IsTetherOncDictionary(const base::DictionaryValue& dict) {
+ std::string network_type;
+ return dict.GetStringWithoutPathExpansion(network_config::kType,
+ &network_type) &&
+ network_type == network_config::kTether;
+}
+
} // namespace onc
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698