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

Side by Side Diff: components/ssl_config/ssl_config_service_manager_pref.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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
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 #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
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
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
OLDNEW
« no previous file with comments | « components/signin/core/browser/account_tracker_service.cc ('k') | components/sync/driver/about_sync_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698