OLD | NEW |
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/buffered_resource_handler.h" | 5 #include "content/browser/renderer_host/buffered_resource_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 293 |
294 info->set_is_download(true); | 294 info->set_is_download(true); |
295 | 295 |
296 scoped_refptr<ResourceHandler> handler( | 296 scoped_refptr<ResourceHandler> handler( |
297 host_->CreateResourceHandlerForDownload( | 297 host_->CreateResourceHandlerForDownload( |
298 request_, | 298 request_, |
299 info->GetContext(), | 299 info->GetContext(), |
300 info->GetChildID(), | 300 info->GetChildID(), |
301 info->GetRouteID(), | 301 info->GetRouteID(), |
302 info->GetRequestID(), | 302 info->GetRequestID(), |
| 303 true, // is_content_initiated |
303 DownloadSaveInfo(), | 304 DownloadSaveInfo(), |
304 DownloadResourceHandler::OnStartedCallback())); | 305 DownloadResourceHandler::OnStartedCallback())); |
305 | 306 |
306 if (!UseAlternateResourceHandler(request_id, handler)) | 307 if (!UseAlternateResourceHandler(request_id, handler)) |
307 return false; | 308 return false; |
308 } | 309 } |
309 | 310 |
310 if (info->pause_count()) | 311 if (info->pause_count()) |
311 return true; | 312 return true; |
312 | 313 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 ResourceRequestInfoImpl::ForRequest(request_); | 454 ResourceRequestInfoImpl::ForRequest(request_); |
454 int child_id = info->GetChildID(); | 455 int child_id = info->GetChildID(); |
455 int request_id = info->GetRequestID(); | 456 int request_id = info->GetRequestID(); |
456 | 457 |
457 host_->PauseRequest(child_id, request_id, false); | 458 host_->PauseRequest(child_id, request_id, false); |
458 if (!CompleteResponseStarted(request_id)) | 459 if (!CompleteResponseStarted(request_id)) |
459 host_->CancelRequest(child_id, request_id, false); | 460 host_->CancelRequest(child_id, request_id, false); |
460 } | 461 } |
461 | 462 |
462 } // namespace content | 463 } // namespace content |
OLD | NEW |