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

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

Issue 2847453002: [CrOS Tether] Remove the ManagedTetherProperties dictionary. (Closed)
Patch Set: Fixed broken OncValidator test. Created 3 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 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 if (limit > 0 && ++count >= limit) 469 if (limit > 0 && ++count >= limit)
470 return; 470 return;
471 } 471 }
472 } 472 }
473 473
474 const NetworkState* NetworkStateHandler::GetNetworkStateFromServicePath( 474 const NetworkState* NetworkStateHandler::GetNetworkStateFromServicePath(
475 const std::string& service_path, 475 const std::string& service_path,
476 bool configured_only) const { 476 bool configured_only) const {
477 ManagedState* managed = 477 ManagedState* managed =
478 GetModifiableManagedState(&network_list_, service_path); 478 GetModifiableManagedState(&network_list_, service_path);
479 if (!managed) 479 if (!managed) {
480 return nullptr; 480 managed = GetModifiableManagedState(&tether_network_list_, service_path);
481 if (!managed)
482 return nullptr;
483 }
481 const NetworkState* network = managed->AsNetworkState(); 484 const NetworkState* network = managed->AsNetworkState();
482 DCHECK(network); 485 DCHECK(network);
483 if (!network->update_received() || 486 if (!network->update_received() ||
484 (configured_only && !network->IsInProfile())) { 487 (configured_only && !network->IsInProfile())) {
485 return nullptr; 488 return nullptr;
486 } 489 }
487 return network; 490 return network;
488 } 491 }
489 492
490 const NetworkState* NetworkStateHandler::GetNetworkStateFromGuid( 493 const NetworkState* NetworkStateHandler::GetNetworkStateFromGuid(
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 if (type.MatchesType(shill::kTypeVPN)) 1418 if (type.MatchesType(shill::kTypeVPN))
1416 technologies.emplace_back(shill::kTypeVPN); 1419 technologies.emplace_back(shill::kTypeVPN);
1417 if (type.MatchesType(kTypeTether)) 1420 if (type.MatchesType(kTypeTether))
1418 technologies.emplace_back(kTypeTether); 1421 technologies.emplace_back(kTypeTether);
1419 1422
1420 CHECK_GT(technologies.size(), 0ul); 1423 CHECK_GT(technologies.size(), 0ul);
1421 return technologies; 1424 return technologies;
1422 } 1425 }
1423 1426
1424 } // namespace chromeos 1427 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/networking_private/chromeos/test.js ('k') | chromeos/network/onc/onc_signature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698