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

Unified Diff: chrome/browser/chromeos/extensions/networking_private_event_router.cc

Issue 12390017: Separating ONC<->Shill translation from the ONC signature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed browser tests. Created 7 years, 10 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: chrome/browser/chromeos/extensions/networking_private_event_router.cc
diff --git a/chrome/browser/chromeos/extensions/networking_private_event_router.cc b/chrome/browser/chromeos/extensions/networking_private_event_router.cc
index 8858e5acf5c5ee716b98f63b3a3bc1fd6080641e..cc42f7b701c1eff328bd687d67bb0af2ddc51d3b 100644
--- a/chrome/browser/chromeos/extensions/networking_private_event_router.cc
+++ b/chrome/browser/chromeos/extensions/networking_private_event_router.cc
@@ -29,36 +29,6 @@ namespace api = extensions::api::networking_private;
namespace chromeos {
-namespace {
-
-// Translates the current connection state of the network into the ONC
-// equivalent.
-std::string GetConnectionState(const NetworkState* state) {
- if (state->IsConnectedState())
- return onc::connection_state::kConnected;
- else if (state->IsConnectingState())
- return onc::connection_state::kConnecting;
- else
- return onc::connection_state::kNotConnected;
-}
-
-// Translate from the Shill network type to the ONC network type.
-std::string GetConnectionType(const std::string& shill_type) {
- base::DictionaryValue shill_type_dict;
- shill_type_dict.SetStringWithoutPathExpansion(flimflam::kTypeProperty,
- shill_type);
- scoped_ptr<base::DictionaryValue> onc_type_dict =
- onc::TranslateShillServiceToONCPart(
- shill_type_dict,
- &onc::kNetworkConfigurationSignature);
- std::string onc_type;
- if (onc_type_dict->GetString(onc::network_config::kType, &onc_type))
- return onc_type;
- return std::string();
-}
-
-} // namespace
-
NetworkingPrivateEventRouter::NetworkingPrivateEventRouter(Profile* profile)
: profile_(profile), listening_(false) {
// Register with the event router so we know when renderers are listening to
« no previous file with comments | « chrome/browser/chromeos/extensions/networking_private_api.cc ('k') | chrome/test/data/extensions/api_test/networking/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698