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

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

Issue 166063003: Check configuration for L2TP/IPsec+certificate VPN network with UIData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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/client_cert_util.cc ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_connection_handler.h" 5 #include "chromeos/network/network_connection_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 bool passphrase_required = false; 63 bool passphrase_required = false;
64 provider_properties.GetBooleanWithoutPathExpansion( 64 provider_properties.GetBooleanWithoutPathExpansion(
65 shill::kPassphraseRequiredProperty, &passphrase_required); 65 shill::kPassphraseRequiredProperty, &passphrase_required);
66 if (passphrase_required) { 66 if (passphrase_required) {
67 NET_LOG_EVENT("OpenVPN: Passphrase Required", service_path); 67 NET_LOG_EVENT("OpenVPN: Passphrase Required", service_path);
68 return true; 68 return true;
69 } 69 }
70 NET_LOG_EVENT("OpenVPN Is Configured", service_path); 70 NET_LOG_EVENT("OpenVPN Is Configured", service_path);
71 } else { 71 } else {
72 bool passphrase_required = false; 72 bool passphrase_required = false;
73 std::string passphrase;
74 provider_properties.GetBooleanWithoutPathExpansion( 73 provider_properties.GetBooleanWithoutPathExpansion(
75 shill::kL2tpIpsecPskRequiredProperty, &passphrase_required); 74 shill::kL2tpIpsecPskRequiredProperty, &passphrase_required);
76 if (passphrase_required) { 75 if (passphrase_required) {
77 NET_LOG_EVENT("VPN: PSK Required", service_path); 76 NET_LOG_EVENT("VPN: PSK Required", service_path);
78 return true; 77 return true;
79 } 78 }
79 provider_properties.GetBooleanWithoutPathExpansion(
80 shill::kPassphraseRequiredProperty, &passphrase_required);
81 if (passphrase_required) {
82 NET_LOG_EVENT("VPN: Passphrase Required", service_path);
83 return true;
84 }
80 NET_LOG_EVENT("VPN Is Configured", service_path); 85 NET_LOG_EVENT("VPN Is Configured", service_path);
81 } 86 }
82 return false; 87 return false;
83 } 88 }
84 89
85 std::string GetDefaultUserProfilePath(const NetworkState* network) { 90 std::string GetDefaultUserProfilePath(const NetworkState* network) {
86 if (!NetworkHandler::IsInitialized() || 91 if (!NetworkHandler::IsInitialized() ||
87 !LoginState::Get()->IsUserAuthenticated() || 92 !LoginState::Get()->IsUserAuthenticated() ||
88 (network && network->type() == shill::kTypeWifi && 93 (network && network->type() == shill::kTypeWifi &&
89 network->security() == shill::kSecurityNone)) { 94 network->security() == shill::kSecurityNone)) {
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 702
698 void NetworkConnectionHandler::HandleShillDisconnectSuccess( 703 void NetworkConnectionHandler::HandleShillDisconnectSuccess(
699 const std::string& service_path, 704 const std::string& service_path,
700 const base::Closure& success_callback) { 705 const base::Closure& success_callback) {
701 NET_LOG_EVENT("Disconnect Request Sent", service_path); 706 NET_LOG_EVENT("Disconnect Request Sent", service_path);
702 if (!success_callback.is_null()) 707 if (!success_callback.is_null())
703 success_callback.Run(); 708 success_callback.Run();
704 } 709 }
705 710
706 } // namespace chromeos 711 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/client_cert_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698