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

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: 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/cert_loader_unittest.cc ('k') | chromeos/network/client_cert_resolver.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 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 Shill properties that have to be configured in
52 // |shill_properties| if the certificate pattern |pattern| could be resolved.
53 // Returns false otherwise and sets empty Shill properties to clear the
54 // certificate configuration.
55 static bool ResolveCertificatePatternSync(
56 const client_cert::ConfigType client_cert_type,
57 const CertificatePattern& pattern,
58 base::DictionaryValue* shill_properties);
59
50 private: 60 private:
51 // NetworkStateHandlerObserver overrides 61 // NetworkStateHandlerObserver overrides
52 virtual void NetworkListChanged() OVERRIDE; 62 virtual void NetworkListChanged() OVERRIDE;
53 63
54 // CertLoader::Observer overrides 64 // CertLoader::Observer overrides
55 virtual void OnCertificatesLoaded(const net::CertificateList& cert_list, 65 virtual void OnCertificatesLoaded(const net::CertificateList& cert_list,
56 bool initial_load) OVERRIDE; 66 bool initial_load) OVERRIDE;
57 67
58 // NetworkPolicyObserver overrides 68 // NetworkPolicyObserver overrides
59 virtual void PolicyApplied(const std::string& service_path) OVERRIDE; 69 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_; 91 scoped_refptr<base::TaskRunner> slow_task_runner_for_test_;
82 92
83 base::WeakPtrFactory<ClientCertResolver> weak_ptr_factory_; 93 base::WeakPtrFactory<ClientCertResolver> weak_ptr_factory_;
84 94
85 DISALLOW_COPY_AND_ASSIGN(ClientCertResolver); 95 DISALLOW_COPY_AND_ASSIGN(ClientCertResolver);
86 }; 96 };
87 97
88 } // namespace chromeos 98 } // namespace chromeos
89 99
90 #endif // CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_ 100 #endif // CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_
OLDNEW
« no previous file with comments | « chromeos/cert_loader_unittest.cc ('k') | chromeos/network/client_cert_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698