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

Side by Side Diff: chromeos/network/network_state_handler.cc

Issue 1043343002: Use networkingPrivate.startConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430115_internet_options_cellular
Patch Set: . Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromeos/network/network_state_handler.h" 5 #include "chromeos/network/network_state_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/json/json_string_value_serializer.h" 10 #include "base/json/json_string_value_serializer.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 NET_LOG_ERROR("GetEAPForEthernet", 410 NET_LOG_ERROR("GetEAPForEthernet",
411 base::StringPrintf( 411 base::StringPrintf(
412 "Ethernet service %s connected using EAP, but no " 412 "Ethernet service %s connected using EAP, but no "
413 "EAP service found.", 413 "EAP service found.",
414 service_path.c_str())); 414 service_path.c_str()));
415 return nullptr; 415 return nullptr;
416 } 416 }
417 return list.front(); 417 return list.front();
418 } 418 }
419 419
420 void NetworkStateHandler::SetLastErrorForTest(const std::string& service_path,
421 const std::string& error) {
422 NetworkState* network_state = GetModifiableNetworkState(service_path);
423 if (!network_state) {
424 LOG(ERROR) << "No matching NetworkState for: " << service_path;
425 return;
426 }
427 network_state->last_error_ = error;
428 }
429
420 //------------------------------------------------------------------------------ 430 //------------------------------------------------------------------------------
421 // ShillPropertyHandler::Delegate overrides 431 // ShillPropertyHandler::Delegate overrides
422 432
423 void NetworkStateHandler::UpdateManagedList(ManagedState::ManagedType type, 433 void NetworkStateHandler::UpdateManagedList(ManagedState::ManagedType type,
424 const base::ListValue& entries) { 434 const base::ListValue& entries) {
425 ManagedStateList* managed_list = GetManagedList(type); 435 ManagedStateList* managed_list = GetManagedList(type);
426 NET_LOG_DEBUG("UpdateManagedList: " + ManagedState::TypeToString(type), 436 NET_LOG_DEBUG("UpdateManagedList: " + ManagedState::TypeToString(type),
427 base::StringPrintf("%" PRIuS, entries.GetSize())); 437 base::StringPrintf("%" PRIuS, entries.GetSize()));
428 // Create a map of existing entries. Assumes all entries in |managed_list| 438 // Create a map of existing entries. Assumes all entries in |managed_list|
429 // are unique. 439 // are unique.
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 if (type.MatchesType(shill::kTypeBluetooth)) 984 if (type.MatchesType(shill::kTypeBluetooth))
975 technologies.push_back(new std::string(shill::kTypeBluetooth)); 985 technologies.push_back(new std::string(shill::kTypeBluetooth));
976 if (type.MatchesType(shill::kTypeVPN)) 986 if (type.MatchesType(shill::kTypeVPN))
977 technologies.push_back(new std::string(shill::kTypeVPN)); 987 technologies.push_back(new std::string(shill::kTypeVPN));
978 988
979 CHECK_GT(technologies.size(), 0ul); 989 CHECK_GT(technologies.size(), 0ul);
980 return technologies.Pass(); 990 return technologies.Pass();
981 } 991 }
982 992
983 } // namespace chromeos 993 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698