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 #include "components/ssl_config/ssl_config_service_manager.h" | 4 #include "components/ssl_config/ssl_config_service_manager.h" |
5 | 5 |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 23 matching lines...) Expand all Loading... |
34 namespace { | 34 namespace { |
35 | 35 |
36 // Converts a ListValue of StringValues into a vector of strings. Any Values | 36 // Converts a ListValue of StringValues into a vector of strings. Any Values |
37 // which cannot be converted will be skipped. | 37 // which cannot be converted will be skipped. |
38 std::vector<std::string> ListValueToStringVector(const base::ListValue* value) { | 38 std::vector<std::string> ListValueToStringVector(const base::ListValue* value) { |
39 std::vector<std::string> results; | 39 std::vector<std::string> results; |
40 results.reserve(value->GetSize()); | 40 results.reserve(value->GetSize()); |
41 std::string s; | 41 std::string s; |
42 for (base::ListValue::const_iterator it = value->begin(); it != value->end(); | 42 for (base::ListValue::const_iterator it = value->begin(); it != value->end(); |
43 ++it) { | 43 ++it) { |
44 if (!it->GetAsString(&s)) | 44 if (!(*it)->GetAsString(&s)) |
45 continue; | 45 continue; |
46 results.push_back(s); | 46 results.push_back(s); |
47 } | 47 } |
48 return results; | 48 return results; |
49 } | 49 } |
50 | 50 |
51 // Parses a vector of cipher suite strings, returning a sorted vector | 51 // Parses a vector of cipher suite strings, returning a sorted vector |
52 // containing the underlying SSL/TLS cipher suites. Unrecognized/invalid | 52 // containing the underlying SSL/TLS cipher suites. Unrecognized/invalid |
53 // cipher suites will be ignored. | 53 // cipher suites will be ignored. |
54 std::vector<uint16_t> ParseCipherSuites( | 54 std::vector<uint16_t> ParseCipherSuites( |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 PrefService* local_state, | 316 PrefService* local_state, |
317 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { | 317 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { |
318 return new SSLConfigServiceManagerPref(local_state, io_task_runner); | 318 return new SSLConfigServiceManagerPref(local_state, io_task_runner); |
319 } | 319 } |
320 | 320 |
321 // static | 321 // static |
322 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { | 322 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { |
323 SSLConfigServiceManagerPref::RegisterPrefs(registry); | 323 SSLConfigServiceManagerPref::RegisterPrefs(registry); |
324 } | 324 } |
325 } // namespace ssl_config | 325 } // namespace ssl_config |
OLD | NEW |