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

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

Issue 10381122: Add flag to specify if explicitly requested download is from web. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to LKGR and integrated into DownloadUrlParams. Created 8 years, 7 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/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
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
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
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/browser/renderer_host/render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698