| OLD | NEW |
| 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 "chrome/browser/chromeos/cros/network_library_impl_base.h" | 5 #include "chrome/browser/chromeos/cros/network_library_impl_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 void NetworkLibraryImplBase::NetworkConnectStart( | 736 void NetworkLibraryImplBase::NetworkConnectStart( |
| 737 Network* network, NetworkProfileType profile_type) { | 737 Network* network, NetworkProfileType profile_type) { |
| 738 DCHECK(network); | 738 DCHECK(network); |
| 739 DCHECK(!network->connection_started()); | 739 DCHECK(!network->connection_started()); |
| 740 // In order to be certain to trigger any notifications, set the connecting | 740 // In order to be certain to trigger any notifications, set the connecting |
| 741 // state locally and notify observers. Otherwise there might be a state | 741 // state locally and notify observers. Otherwise there might be a state |
| 742 // change without a forced notify. | 742 // change without a forced notify. |
| 743 network->set_connecting(); | 743 network->set_connecting(); |
| 744 // Distinguish between user-initiated connection attempts | 744 // Distinguish between user-initiated connection attempts |
| 745 // and auto-connect. | 745 // and auto-connect. |
| 746 network->set_connection_started(true); | 746 network->set_user_connect_state(USER_CONNECT_STARTED); |
| 747 NotifyNetworkManagerChanged(true); // Forced update. | 747 NotifyNetworkManagerChanged(true); // Forced update. |
| 748 VLOG(1) << "Requesting connect to network: " << network->name() | 748 VLOG(1) << "Requesting connect to network: " << network->name() |
| 749 << " profile type: " << profile_type; | 749 << " profile type: " << profile_type; |
| 750 // Specify the correct profile for wifi networks (if specified or unset). | 750 // Specify the correct profile for wifi networks (if specified or unset). |
| 751 if ((network->type() == TYPE_WIFI || network->type() == TYPE_WIMAX) && | 751 if ((network->type() == TYPE_WIFI || network->type() == TYPE_WIMAX) && |
| 752 (profile_type != PROFILE_NONE || | 752 (profile_type != PROFILE_NONE || |
| 753 network->profile_type() == PROFILE_NONE)) { | 753 network->profile_type() == PROFILE_NONE)) { |
| 754 if (network->RequiresUserProfile()) | 754 if (network->RequiresUserProfile()) |
| 755 profile_type = PROFILE_USER; // Networks with certs can not be shared. | 755 profile_type = PROFILE_USER; // Networks with certs can not be shared. |
| 756 else if (profile_type == PROFILE_NONE) | 756 else if (profile_type == PROFILE_NONE) |
| (...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1745 GetTpmInfo(); | 1745 GetTpmInfo(); |
| 1746 return tpm_slot_; | 1746 return tpm_slot_; |
| 1747 } | 1747 } |
| 1748 | 1748 |
| 1749 const std::string& NetworkLibraryImplBase::GetTpmPin() { | 1749 const std::string& NetworkLibraryImplBase::GetTpmPin() { |
| 1750 GetTpmInfo(); | 1750 GetTpmInfo(); |
| 1751 return tpm_pin_; | 1751 return tpm_pin_; |
| 1752 } | 1752 } |
| 1753 | 1753 |
| 1754 } // namespace chromeos | 1754 } // namespace chromeos |
| OLD | NEW |