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

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

Issue 2844363003: [CrOS Tether] Add HasConnectedToHost property for Tether networks. (Closed)
Patch Set: Rebased. 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
« no previous file with comments | « chromeos/network/network_state.cc ('k') | chromeos/network/network_state_unittest.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 <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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 524
525 tether_network_state->set_name(name); 525 tether_network_state->set_name(name);
526 tether_network_state->set_type(kTypeTether); 526 tether_network_state->set_type(kTypeTether);
527 tether_network_state->SetGuid(guid); 527 tether_network_state->SetGuid(guid);
528 tether_network_state->set_visible(true); 528 tether_network_state->set_visible(true);
529 tether_network_state->set_update_received(); 529 tether_network_state->set_update_received();
530 tether_network_state->set_update_requested(false); 530 tether_network_state->set_update_requested(false);
531 tether_network_state->set_connectable(true); 531 tether_network_state->set_connectable(true);
532 tether_network_state->set_carrier(carrier); 532 tether_network_state->set_carrier(carrier);
533 tether_network_state->set_battery_percentage(battery_percentage); 533 tether_network_state->set_battery_percentage(battery_percentage);
534 // TODO(khorimoto): Add this field as a parameter to this function and set it
535 // accordingly from the Tether component.
536 tether_network_state->set_tether_has_connected_to_host(false);
534 tether_network_state->set_signal_strength(signal_strength); 537 tether_network_state->set_signal_strength(signal_strength);
535 538
536 tether_network_list_.push_back(std::move(tether_network_state)); 539 tether_network_list_.push_back(std::move(tether_network_state));
537 NotifyNetworkListChanged(); 540 NotifyNetworkListChanged();
538 } 541 }
539 542
540 bool NetworkStateHandler::UpdateTetherNetworkProperties( 543 bool NetworkStateHandler::UpdateTetherNetworkProperties(
541 const std::string& guid, 544 const std::string& guid,
542 const std::string& carrier, 545 const std::string& carrier,
543 int battery_percentage, 546 int battery_percentage,
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 if (type.MatchesType(shill::kTypeVPN)) 1421 if (type.MatchesType(shill::kTypeVPN))
1419 technologies.emplace_back(shill::kTypeVPN); 1422 technologies.emplace_back(shill::kTypeVPN);
1420 if (type.MatchesType(kTypeTether)) 1423 if (type.MatchesType(kTypeTether))
1421 technologies.emplace_back(kTypeTether); 1424 technologies.emplace_back(kTypeTether);
1422 1425
1423 CHECK_GT(technologies.size(), 0ul); 1426 CHECK_GT(technologies.size(), 0ul);
1424 return technologies; 1427 return technologies;
1425 } 1428 }
1426 1429
1427 } // namespace chromeos 1430 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state.cc ('k') | chromeos/network/network_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698