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

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

Issue 421113002: Use correct slot id for client certs in network config. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/network/client_cert_util.cc ('k') | chromeos/network/network_connection_handler.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 #ifndef CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_ 5 #ifndef CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_
6 #define CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_ 6 #define CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chromeos/cert_loader.h" 16 #include "chromeos/cert_loader.h"
17 #include "chromeos/chromeos_export.h" 17 #include "chromeos/chromeos_export.h"
18 #include "chromeos/dbus/dbus_method_call_status.h" 18 #include "chromeos/dbus/dbus_method_call_status.h"
19 #include "chromeos/login/login_state.h" 19 #include "chromeos/login/login_state.h"
20 #include "chromeos/network/network_handler.h" 20 #include "chromeos/network/network_handler.h"
21 #include "chromeos/network/network_handler_callbacks.h" 21 #include "chromeos/network/network_handler_callbacks.h"
22 #include "chromeos/network/network_policy_observer.h" 22 #include "chromeos/network/network_policy_observer.h"
23 #include "chromeos/network/network_state_handler_observer.h" 23 #include "chromeos/network/network_state_handler_observer.h"
24 24
25 namespace chromeos { 25 namespace chromeos {
26 26
27 class CertificatePattern;
28 class NetworkState; 27 class NetworkState;
29 28
30 // The NetworkConnectionHandler class is used to manage network connection 29 // The NetworkConnectionHandler class is used to manage network connection
31 // requests. This is the only class that should make Shill Connect calls. 30 // requests. This is the only class that should make Shill Connect calls.
32 // It handles the following steps: 31 // It handles the following steps:
33 // 1. Determine whether or not sufficient information (e.g. passphrase) is 32 // 1. Determine whether or not sufficient information (e.g. passphrase) is
34 // known to be available to connect to the network. 33 // known to be available to connect to the network.
35 // 2. Request additional information (e.g. user data which contains certificate 34 // 2. Request additional information (e.g. user data which contains certificate
36 // information) and determine whether sufficient information is available. 35 // information) and determine whether sufficient information is available.
37 // 3. Possibly configure the network certificate info (tpm slot and pkcs11 id). 36 // 3. Possibly configure the network certificate info (tpm slot and pkcs11 id).
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 186
188 // Handles success or failure from Shill.Service.Connect. 187 // Handles success or failure from Shill.Service.Connect.
189 void HandleShillConnectSuccess(const std::string& service_path); 188 void HandleShillConnectSuccess(const std::string& service_path);
190 void HandleShillConnectFailure(const std::string& service_path, 189 void HandleShillConnectFailure(const std::string& service_path,
191 const std::string& error_name, 190 const std::string& error_name,
192 const std::string& error_message); 191 const std::string& error_message);
193 192
194 void CheckPendingRequest(const std::string service_path); 193 void CheckPendingRequest(const std::string service_path);
195 void CheckAllPendingRequests(); 194 void CheckAllPendingRequests();
196 195
197 // Returns the PKCS#11 ID of a cert matching the certificate pattern. Returns
198 // empty string otherwise.
199 std::string CertificateIsConfigured(const CertificatePattern& pattern);
200 void ErrorCallbackForPendingRequest(const std::string& service_path, 196 void ErrorCallbackForPendingRequest(const std::string& service_path,
201 const std::string& error_name); 197 const std::string& error_name);
202 198
203 // Calls Shill.Manager.Disconnect asynchronously. 199 // Calls Shill.Manager.Disconnect asynchronously.
204 void CallShillDisconnect( 200 void CallShillDisconnect(
205 const std::string& service_path, 201 const std::string& service_path,
206 const base::Closure& success_callback, 202 const base::Closure& success_callback,
207 const network_handler::ErrorCallback& error_callback); 203 const network_handler::ErrorCallback& error_callback);
208 204
209 // Handle success from Shill.Service.Disconnect. 205 // Handle success from Shill.Service.Disconnect.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Whether the handler already requested a 'ConnectToBestNetwork' after login, 246 // Whether the handler already requested a 'ConnectToBestNetwork' after login,
251 // see ConnectToBestNetworkAfterLogin(). 247 // see ConnectToBestNetworkAfterLogin().
252 bool requested_connect_to_best_network_; 248 bool requested_connect_to_best_network_;
253 249
254 DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandler); 250 DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandler);
255 }; 251 };
256 252
257 } // namespace chromeos 253 } // namespace chromeos
258 254
259 #endif // CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_ 255 #endif // CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_
OLDNEW
« no previous file with comments | « chromeos/network/client_cert_util.cc ('k') | chromeos/network/network_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698