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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_socket_utils.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 4
5 #include "content/browser/renderer_host/pepper/pepper_socket_utils.h" 5 #include "content/browser/renderer_host/pepper/pepper_socket_utils.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return false; 73 return false;
74 } 74 }
75 75
76 return true; 76 return true;
77 } 77 }
78 78
79 bool GetCertificateFields(const net::X509Certificate& cert, 79 bool GetCertificateFields(const net::X509Certificate& cert,
80 ppapi::PPB_X509Certificate_Fields* fields) { 80 ppapi::PPB_X509Certificate_Fields* fields) {
81 const net::CertPrincipal& issuer = cert.issuer(); 81 const net::CertPrincipal& issuer = cert.issuer();
82 fields->SetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_COMMON_NAME, 82 fields->SetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_COMMON_NAME,
83 base::MakeUnique<base::StringValue>(issuer.common_name)); 83 base::MakeUnique<base::Value>(issuer.common_name));
84 fields->SetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_LOCALITY_NAME, 84 fields->SetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_LOCALITY_NAME,
85 base::MakeUnique<base::StringValue>(issuer.locality_name)); 85 base::MakeUnique<base::Value>(issuer.locality_name));
86 fields->SetField( 86 fields->SetField(
87 PP_X509CERTIFICATE_PRIVATE_ISSUER_STATE_OR_PROVINCE_NAME, 87 PP_X509CERTIFICATE_PRIVATE_ISSUER_STATE_OR_PROVINCE_NAME,
88 base::MakeUnique<base::StringValue>(issuer.state_or_province_name)); 88 base::MakeUnique<base::Value>(issuer.state_or_province_name));
89 fields->SetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_COUNTRY_NAME, 89 fields->SetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_COUNTRY_NAME,
90 base::MakeUnique<base::StringValue>(issuer.country_name)); 90 base::MakeUnique<base::Value>(issuer.country_name));
91 fields->SetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_ORGANIZATION_NAME, 91 fields->SetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_ORGANIZATION_NAME,
92 base::MakeUnique<base::StringValue>( 92 base::MakeUnique<base::Value>(
93 base::JoinString(issuer.organization_names, "\n"))); 93 base::JoinString(issuer.organization_names, "\n")));
94 fields->SetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_ORGANIZATION_UNIT_NAME, 94 fields->SetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_ORGANIZATION_UNIT_NAME,
95 base::MakeUnique<base::StringValue>( 95 base::MakeUnique<base::Value>(
96 base::JoinString(issuer.organization_unit_names, "\n"))); 96 base::JoinString(issuer.organization_unit_names, "\n")));
97 97
98 const net::CertPrincipal& subject = cert.subject(); 98 const net::CertPrincipal& subject = cert.subject();
99 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_COMMON_NAME, 99 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_COMMON_NAME,
100 base::MakeUnique<base::StringValue>(subject.common_name)); 100 base::MakeUnique<base::Value>(subject.common_name));
101 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_LOCALITY_NAME, 101 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_LOCALITY_NAME,
102 base::MakeUnique<base::StringValue>(subject.locality_name)); 102 base::MakeUnique<base::Value>(subject.locality_name));
103 fields->SetField( 103 fields->SetField(
104 PP_X509CERTIFICATE_PRIVATE_SUBJECT_STATE_OR_PROVINCE_NAME, 104 PP_X509CERTIFICATE_PRIVATE_SUBJECT_STATE_OR_PROVINCE_NAME,
105 base::MakeUnique<base::StringValue>(subject.state_or_province_name)); 105 base::MakeUnique<base::Value>(subject.state_or_province_name));
106 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_COUNTRY_NAME, 106 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_COUNTRY_NAME,
107 base::MakeUnique<base::StringValue>(subject.country_name)); 107 base::MakeUnique<base::Value>(subject.country_name));
108 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_ORGANIZATION_NAME, 108 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_ORGANIZATION_NAME,
109 base::MakeUnique<base::StringValue>( 109 base::MakeUnique<base::Value>(
110 base::JoinString(subject.organization_names, "\n"))); 110 base::JoinString(subject.organization_names, "\n")));
111 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_ORGANIZATION_UNIT_NAME, 111 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_ORGANIZATION_UNIT_NAME,
112 base::MakeUnique<base::StringValue>(base::JoinString( 112 base::MakeUnique<base::Value>(base::JoinString(
113 subject.organization_unit_names, "\n"))); 113 subject.organization_unit_names, "\n")));
114 114
115 const std::string& serial_number = cert.serial_number(); 115 const std::string& serial_number = cert.serial_number();
116 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SERIAL_NUMBER, 116 fields->SetField(PP_X509CERTIFICATE_PRIVATE_SERIAL_NUMBER,
117 base::BinaryValue::CreateWithCopiedBuffer( 117 base::BinaryValue::CreateWithCopiedBuffer(
118 serial_number.data(), serial_number.length())); 118 serial_number.data(), serial_number.length()));
119 fields->SetField( 119 fields->SetField(
120 PP_X509CERTIFICATE_PRIVATE_VALIDITY_NOT_BEFORE, 120 PP_X509CERTIFICATE_PRIVATE_VALIDITY_NOT_BEFORE,
121 base::MakeUnique<base::Value>(cert.valid_start().ToDoubleT())); 121 base::MakeUnique<base::Value>(cert.valid_start().ToDoubleT()));
122 fields->SetField( 122 fields->SetField(
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 180 }
181 181
182 void OpenUDPFirewallHole(const net::IPEndPoint& address, 182 void OpenUDPFirewallHole(const net::IPEndPoint& address,
183 FirewallHoleOpenCallback callback) { 183 FirewallHoleOpenCallback callback) {
184 OpenFirewallHole(address, chromeos::FirewallHole::PortType::UDP, callback); 184 OpenFirewallHole(address, chromeos::FirewallHole::PortType::UDP, callback);
185 } 185 }
186 #endif // defined(OS_CHROMEOS) 186 #endif // defined(OS_CHROMEOS)
187 187
188 } // namespace pepper_socket_utils 188 } // namespace pepper_socket_utils
189 } // namespace content 189 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_internals_ui.cc ('k') | content/browser/service_worker/service_worker_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698