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

Side by Side Diff: chromeos/network/client_cert_resolver.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: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_ 5 #ifndef CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_
6 #define CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_ 6 #define CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "chromeos/cert_loader.h" 15 #include "chromeos/cert_loader.h"
16 #include "chromeos/chromeos_export.h" 16 #include "chromeos/chromeos_export.h"
17 #include "chromeos/network/client_cert_util.h"
17 #include "chromeos/network/network_policy_observer.h" 18 #include "chromeos/network/network_policy_observer.h"
18 #include "chromeos/network/network_state_handler.h" 19 #include "chromeos/network/network_state_handler.h"
19 #include "chromeos/network/network_state_handler_observer.h" 20 #include "chromeos/network/network_state_handler_observer.h"
20 21
21 namespace base { 22 namespace base {
22 class TaskRunner; 23 class TaskRunner;
23 } 24 }
24 25
25 namespace chromeos { 26 namespace chromeos {
26 27
(...skipping 13 matching lines...) Expand all
40 virtual ~ClientCertResolver(); 41 virtual ~ClientCertResolver();
41 42
42 void Init(NetworkStateHandler* network_state_handler, 43 void Init(NetworkStateHandler* network_state_handler,
43 ManagedNetworkConfigurationHandler* managed_network_config_handler); 44 ManagedNetworkConfigurationHandler* managed_network_config_handler);
44 45
45 // Sets the task runner that any slow calls will be made from, e.g. calls 46 // Sets the task runner that any slow calls will be made from, e.g. calls
46 // to the NSS database. If not set, uses base::WorkerPool. 47 // to the NSS database. If not set, uses base::WorkerPool.
47 void SetSlowTaskRunnerForTest( 48 void SetSlowTaskRunnerForTest(
48 const scoped_refptr<base::TaskRunner>& task_runner); 49 const scoped_refptr<base::TaskRunner>& task_runner);
49 50
51 // Returns true and sets the properties that have to be configured in
52 // |config_properties| if the certificate pattern |pattern| could be resolved.
53 static bool ResolveCertificatePatternSync(
54 const client_cert::ConfigType client_cert_type,
55 const CertificatePattern& pattern,
56 base::DictionaryValue* config_properties);
57
50 private: 58 private:
51 // NetworkStateHandlerObserver overrides 59 // NetworkStateHandlerObserver overrides
52 virtual void NetworkListChanged() OVERRIDE; 60 virtual void NetworkListChanged() OVERRIDE;
53 61
54 // CertLoader::Observer overrides 62 // CertLoader::Observer overrides
55 virtual void OnCertificatesLoaded(const net::CertificateList& cert_list, 63 virtual void OnCertificatesLoaded(const net::CertificateList& cert_list,
56 bool initial_load) OVERRIDE; 64 bool initial_load) OVERRIDE;
57 65
58 // NetworkPolicyObserver overrides 66 // NetworkPolicyObserver overrides
59 virtual void PolicyApplied(const std::string& service_path) OVERRIDE; 67 virtual void PolicyApplied(const std::string& service_path) OVERRIDE;
(...skipping 21 matching lines...) Expand all
81 scoped_refptr<base::TaskRunner> slow_task_runner_for_test_; 89 scoped_refptr<base::TaskRunner> slow_task_runner_for_test_;
82 90
83 base::WeakPtrFactory<ClientCertResolver> weak_ptr_factory_; 91 base::WeakPtrFactory<ClientCertResolver> weak_ptr_factory_;
84 92
85 DISALLOW_COPY_AND_ASSIGN(ClientCertResolver); 93 DISALLOW_COPY_AND_ASSIGN(ClientCertResolver);
86 }; 94 };
87 95
88 } // namespace chromeos 96 } // namespace chromeos
89 97
90 #endif // CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_ 98 #endif // CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698