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

Unified Diff: chromeos/network/managed_network_configuration_handler_impl.cc

Issue 275543005: Use GUID instead of ServicePath in networkingPrivate API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase off https://codereview.chromium.org/284673004/ Created 6 years, 7 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/managed_network_configuration_handler_impl.cc
diff --git a/chromeos/network/managed_network_configuration_handler_impl.cc b/chromeos/network/managed_network_configuration_handler_impl.cc
index 5415a7608b1104083231745fc4fe0201f31fa9eb..2d464f77909287877c332a8f94554e812e89fd8c 100644
--- a/chromeos/network/managed_network_configuration_handler_impl.cc
+++ b/chromeos/network/managed_network_configuration_handler_impl.cc
@@ -19,6 +19,7 @@
#include "chromeos/dbus/shill_profile_client.h"
#include "chromeos/dbus/shill_service_client.h"
#include "chromeos/network/device_state.h"
+#include "chromeos/network/favorite_state.h"
#include "chromeos/network/network_configuration_handler.h"
#include "chromeos/network/network_event_log.h"
#include "chromeos/network/network_policy_observer.h"
@@ -50,7 +51,7 @@ const char kPoliciesNotInitialized[] = "PoliciesNotInitialized";
const char kProfileNotInitialized[] = "ProflieNotInitialized";
const char kSetOnUnconfiguredNetwork[] = "SetCalledOnUnconfiguredNetwork";
const char kUnknownProfilePath[] = "UnknownProfilePath";
-const char kUnknownServicePath[] = "UnknownServicePath";
+const char kUnknownNetwork[] = "UnknownNetwork";
std::string ToDebugString(::onc::ONCSource source,
const std::string& userhash) {
@@ -237,11 +238,11 @@ void ManagedNetworkConfigurationHandlerImpl::SetProperties(
const base::DictionaryValue& user_settings,
const base::Closure& callback,
const network_handler::ErrorCallback& error_callback) const {
- const NetworkState* state =
- network_state_handler_->GetNetworkState(service_path);
-
+ const FavoriteState* state =
+ network_state_handler_->GetFavoriteStateFromServicePath(
+ service_path, true /* configured_only */);
if (!state) {
- InvokeErrorCallback(service_path, error_callback, kUnknownServicePath);
+ InvokeErrorCallback(service_path, error_callback, kUnknownNetwork);
return;
}

Powered by Google App Engine
This is Rietveld 408576698