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

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

Issue 1085993002: Revert of 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
« no previous file with comments | « chromeos/network/network_state_handler.h ('k') | chromeos/network/network_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
430 //------------------------------------------------------------------------------ 420 //------------------------------------------------------------------------------
431 // ShillPropertyHandler::Delegate overrides 421 // ShillPropertyHandler::Delegate overrides
432 422
433 void NetworkStateHandler::UpdateManagedList(ManagedState::ManagedType type, 423 void NetworkStateHandler::UpdateManagedList(ManagedState::ManagedType type,
434 const base::ListValue& entries) { 424 const base::ListValue& entries) {
435 ManagedStateList* managed_list = GetManagedList(type); 425 ManagedStateList* managed_list = GetManagedList(type);
436 NET_LOG_DEBUG("UpdateManagedList: " + ManagedState::TypeToString(type), 426 NET_LOG_DEBUG("UpdateManagedList: " + ManagedState::TypeToString(type),
437 base::StringPrintf("%" PRIuS, entries.GetSize())); 427 base::StringPrintf("%" PRIuS, entries.GetSize()));
438 // Create a map of existing entries. Assumes all entries in |managed_list| 428 // Create a map of existing entries. Assumes all entries in |managed_list|
439 // are unique. 429 // are unique.
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 if (type.MatchesType(shill::kTypeBluetooth)) 974 if (type.MatchesType(shill::kTypeBluetooth))
985 technologies.push_back(new std::string(shill::kTypeBluetooth)); 975 technologies.push_back(new std::string(shill::kTypeBluetooth));
986 if (type.MatchesType(shill::kTypeVPN)) 976 if (type.MatchesType(shill::kTypeVPN))
987 technologies.push_back(new std::string(shill::kTypeVPN)); 977 technologies.push_back(new std::string(shill::kTypeVPN));
988 978
989 CHECK_GT(technologies.size(), 0ul); 979 CHECK_GT(technologies.size(), 0ul);
990 return technologies.Pass(); 980 return technologies.Pass();
991 } 981 }
992 982
993 } // namespace chromeos 983 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state_handler.h ('k') | chromeos/network/network_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698