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

Side by Side Diff: content/browser/renderer_host/x509_user_cert_resource_handler.cc

Issue 10416003: RefCounted types should not have public destructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more fix Created 8 years, 6 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) 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/x509_user_cert_resource_handler.h" 5 #include "content/browser/renderer_host/x509_user_cert_resource_handler.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "content/browser/renderer_host/resource_request_info_impl.h" 8 #include "content/browser/renderer_host/resource_request_info_impl.h"
9 #include "content/public/browser/content_browser_client.h" 9 #include "content/public/browser/content_browser_client.h"
10 #include "content/public/common/resource_response.h" 10 #include "content/public/common/resource_response.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const GURL& url, 43 const GURL& url,
44 ResourceResponse* resp, 44 ResourceResponse* resp,
45 bool* defer) { 45 bool* defer) {
46 url_ = url; 46 url_ = url;
47 return true; 47 return true;
48 } 48 }
49 49
50 bool X509UserCertResourceHandler::OnResponseStarted(int request_id, 50 bool X509UserCertResourceHandler::OnResponseStarted(int request_id,
51 ResourceResponse* resp, 51 ResourceResponse* resp,
52 bool* defer) { 52 bool* defer) {
53 return (resp->mime_type == "application/x-x509-user-cert"); 53 return (resp->head.mime_type == "application/x-x509-user-cert");
54 } 54 }
55 55
56 bool X509UserCertResourceHandler::OnWillStart(int request_id, 56 bool X509UserCertResourceHandler::OnWillStart(int request_id,
57 const GURL& url, 57 const GURL& url,
58 bool* defer) { 58 bool* defer) {
59 return true; 59 return true;
60 } 60 }
61 61
62 bool X509UserCertResourceHandler::OnWillRead(int request_id, 62 bool X509UserCertResourceHandler::OnWillRead(int request_id,
63 net::IOBuffer** buf, 63 net::IOBuffer** buf,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 size_t data_len = buffer_[i].second; 131 size_t data_len = buffer_[i].second;
132 DCHECK(data != NULL); 132 DCHECK(data != NULL);
133 DCHECK_LE(bytes_copied + data_len, content_length_); 133 DCHECK_LE(bytes_copied + data_len, content_length_);
134 memcpy(resource_buffer_->data() + bytes_copied, data->data(), data_len); 134 memcpy(resource_buffer_->data() + bytes_copied, data->data(), data_len);
135 bytes_copied += data_len; 135 bytes_copied += data_len;
136 } 136 }
137 DCHECK_EQ(content_length_, bytes_copied); 137 DCHECK_EQ(content_length_, bytes_copied);
138 } 138 }
139 139
140 } // namespace content 140 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/sync_resource_handler.cc ('k') | content/public/common/resource_response.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698