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

Side by Side Diff: chrome/browser/renderer_host/download_throttling_resource_handler.cc

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 years 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) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 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/renderer_host/download_throttling_resource_handler.h" 5 #include "chrome/browser/renderer_host/download_throttling_resource_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/renderer_host/download_resource_handler.h" 8 #include "chrome/browser/renderer_host/download_resource_handler.h"
9 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" 9 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
10 #include "chrome/common/resource_response.h" 10 #include "chrome/common/resource_response.h"
11 #include "net/base/io_buffer.h" 11 #include "net/base/io_buffer.h"
12 #include "net/base/mime_sniffer.h" 12 #include "net/base/mime_sniffer.h"
13 13
14 DownloadThrottlingResourceHandler::DownloadThrottlingResourceHandler( 14 DownloadThrottlingResourceHandler::DownloadThrottlingResourceHandler(
15 ResourceDispatcherHost* host, 15 ResourceDispatcherHost* host,
16 URLRequest* request, 16 net::URLRequest* request,
17 const GURL& url, 17 const GURL& url,
18 int render_process_host_id, 18 int render_process_host_id,
19 int render_view_id, 19 int render_view_id,
20 int request_id, 20 int request_id,
21 bool in_complete) 21 bool in_complete)
22 : host_(host), 22 : host_(host),
23 request_(request), 23 request_(request),
24 url_(url), 24 url_(url),
25 render_process_host_id_(render_process_host_id), 25 render_process_host_id_(render_process_host_id),
26 render_view_id_(render_view_id), 26 render_view_id_(render_view_id),
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 int buf_size; 176 int buf_size;
177 if (download_handler_->OnWillRead(request_id_, &buffer, &buf_size, 177 if (download_handler_->OnWillRead(request_id_, &buffer, &buf_size,
178 tmp_buffer_length_)) { 178 tmp_buffer_length_)) {
179 CHECK(buf_size >= tmp_buffer_length_); 179 CHECK(buf_size >= tmp_buffer_length_);
180 memcpy(buffer->data(), tmp_buffer_->data(), tmp_buffer_length_); 180 memcpy(buffer->data(), tmp_buffer_->data(), tmp_buffer_length_);
181 download_handler_->OnReadCompleted(request_id_, &tmp_buffer_length_); 181 download_handler_->OnReadCompleted(request_id_, &tmp_buffer_length_);
182 } 182 }
183 tmp_buffer_length_ = 0; 183 tmp_buffer_length_ = 0;
184 tmp_buffer_ = NULL; 184 tmp_buffer_ = NULL;
185 } 185 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698