Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / net / chrome_fraudulent_certificate_reporter.cc
index 19775ff..5aef283 100644 (file)
@@ -51,6 +51,8 @@ static std::string BuildReport(const std::string& hostname,
   for (size_t i = 0; i < pem_encoded_chain.size(); ++i)
     *cert_chain += pem_encoded_chain[i];
 
+  request.add_pin(ssl_info.pinning_failure_log);
+
   std::string out;
   request.SerializeToString(&out);
   return out;
@@ -60,20 +62,18 @@ scoped_ptr<net::URLRequest>
 ChromeFraudulentCertificateReporter::CreateURLRequest(
     net::URLRequestContext* context) {
   scoped_ptr<net::URLRequest> request =
-      context->CreateRequest(upload_url_, net::DEFAULT_PRIORITY, this);
-  request->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES |
-                          net::LOAD_DO_NOT_SAVE_COOKIES);
+      context->CreateRequest(upload_url_, net::DEFAULT_PRIORITY, this, NULL);
+  request->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
+                        net::LOAD_DO_NOT_SAVE_COOKIES);
   return request.Pass();
 }
 
 void ChromeFraudulentCertificateReporter::SendReport(
     const std::string& hostname,
-    const net::SSLInfo& ssl_info,
-    bool sni_available) {
+    const net::SSLInfo& ssl_info) {
   // We do silent/automatic reporting ONLY for Google properties. For other
   // domains (when we start supporting that), we will ask for user permission.
-  if (!net::TransportSecurityState::IsGooglePinnedProperty(hostname,
-                                                           sni_available)) {
+  if (!net::TransportSecurityState::IsGooglePinnedProperty(hostname)) {
     return;
   }