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

Side by Side Diff: chrome/browser/net/chrome_dns_cert_provenance_checker.cc

Issue 7846007: net: Rename URLRequestStatus::os_error_. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix os_error_code Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/net/chrome_dns_cert_provenance_checker.h" 5 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "chrome/browser/net/chrome_url_request_context.h" 9 #include "chrome/browser/net/chrome_url_request_context.h"
10 #include "net/url_request/url_request.h" 10 #include "net/url_request/url_request.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 explicit URLRequestDelegate(ChromeDnsCertProvenanceChecker* checker) 76 explicit URLRequestDelegate(ChromeDnsCertProvenanceChecker* checker)
77 : checker_(checker) { 77 : checker_(checker) {
78 } 78 }
79 79
80 // Delegate implementation 80 // Delegate implementation
81 void OnResponseStarted(net::URLRequest* request) { 81 void OnResponseStarted(net::URLRequest* request) {
82 const net::URLRequestStatus& status(request->status()); 82 const net::URLRequestStatus& status(request->status());
83 if (!status.is_success()) { 83 if (!status.is_success()) {
84 LOG(WARNING) << "Certificate upload failed" 84 LOG(WARNING) << "Certificate upload failed"
85 << " status:" << status.status() 85 << " status:" << status.status()
86 << " os_error:" << status.os_error(); 86 << " error:" << status.error();
87 } else if (request->GetResponseCode() != 200) { 87 } else if (request->GetResponseCode() != 200) {
88 LOG(WARNING) << "Certificate upload HTTP status: " 88 LOG(WARNING) << "Certificate upload HTTP status: "
89 << request->GetResponseCode(); 89 << request->GetResponseCode();
90 } 90 }
91 checker_->RequestComplete(request); 91 checker_->RequestComplete(request);
92 } 92 }
93 93
94 void OnReadCompleted(net::URLRequest* request, int bytes_read) { 94 void OnReadCompleted(net::URLRequest* request, int bytes_read) {
95 NOTREACHED(); 95 NOTREACHED();
96 } 96 }
97 97
98 private: 98 private:
99 ChromeDnsCertProvenanceChecker* const checker_; 99 ChromeDnsCertProvenanceChecker* const checker_;
100 }; 100 };
101 101
102 net::DnsRRResolver* const dnsrr_resolver_; 102 net::DnsRRResolver* const dnsrr_resolver_;
103 ChromeURLRequestContext* const url_req_context_; 103 ChromeURLRequestContext* const url_req_context_;
104 const GURL upload_url_; 104 const GURL upload_url_;
105 URLRequestDelegate delegate_; 105 URLRequestDelegate delegate_;
106 std::set<net::URLRequest*> inflight_requests_; 106 std::set<net::URLRequest*> inflight_requests_;
107 }; 107 };
108 108
109 } // namespace 109 } // namespace
110 110
111 net::DnsCertProvenanceChecker* CreateChromeDnsCertProvenanceChecker( 111 net::DnsCertProvenanceChecker* CreateChromeDnsCertProvenanceChecker(
112 net::DnsRRResolver* dnsrr_resolver, 112 net::DnsRRResolver* dnsrr_resolver,
113 ChromeURLRequestContext* url_req_context) { 113 ChromeURLRequestContext* url_req_context) {
114 return new ChromeDnsCertProvenanceChecker(dnsrr_resolver, url_req_context); 114 return new ChromeDnsCertProvenanceChecker(dnsrr_resolver, url_req_context);
115 } 115 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_webrequest_api_unittest.cc ('k') | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698