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

Side by Side Diff: content/browser/renderer_host/render_message_filter.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/render_message_filter.h" 5 #include "content/browser/renderer_host/render_message_filter.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 const string16& suggested_name) { 716 const string16& suggested_name) {
717 content::DownloadSaveInfo save_info; 717 content::DownloadSaveInfo save_info;
718 save_info.suggested_name = suggested_name; 718 save_info.suggested_name = suggested_name;
719 scoped_ptr<net::URLRequest> request(new net::URLRequest(url, NULL)); 719 scoped_ptr<net::URLRequest> request(new net::URLRequest(url, NULL));
720 request->set_referrer(referrer.url.spec()); 720 request->set_referrer(referrer.url.spec());
721 webkit_glue::ConfigureURLRequestForReferrerPolicy( 721 webkit_glue::ConfigureURLRequestForReferrerPolicy(
722 request.get(), referrer.policy); 722 request.get(), referrer.policy);
723 download_stats::RecordDownloadSource(download_stats::INITIATED_BY_RENDERER); 723 download_stats::RecordDownloadSource(download_stats::INITIATED_BY_RENDERER);
724 resource_dispatcher_host_->BeginDownload( 724 resource_dispatcher_host_->BeginDownload(
725 request.Pass(), 725 request.Pass(),
726 true, // is_content_initiated
726 resource_context_, 727 resource_context_,
727 render_process_id_, 728 render_process_id_,
728 message.routing_id(), 729 message.routing_id(),
729 false, 730 false,
730 save_info, 731 save_info,
731 ResourceDispatcherHostImpl::DownloadStartedCallback()); 732 ResourceDispatcherHostImpl::DownloadStartedCallback());
732 } 733 }
733 734
734 void RenderMessageFilter::OnCheckNotificationPermission( 735 void RenderMessageFilter::OnCheckNotificationPermission(
735 const GURL& source_origin, int* result) { 736 const GURL& source_origin, int* result) {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 // for a resize or if no backing store) the RenderWidgetHost is blocking the 951 // for a resize or if no backing store) the RenderWidgetHost is blocking the
951 // UI thread for some time, waiting for an UpdateRect from the renderer. If we 952 // UI thread for some time, waiting for an UpdateRect from the renderer. If we
952 // are going to switch to accelerated compositing, the GPU process may need 953 // are going to switch to accelerated compositing, the GPU process may need
953 // round-trips to the UI thread before finishing the frame, causing deadlocks 954 // round-trips to the UI thread before finishing the frame, causing deadlocks
954 // if we delay the UpdateRect until we receive the OnSwapBuffersComplete. So 955 // if we delay the UpdateRect until we receive the OnSwapBuffersComplete. So
955 // the renderer sent us this message, so that we can unblock the UI thread. 956 // the renderer sent us this message, so that we can unblock the UI thread.
956 // We will simply re-use the UpdateRect unblock mechanism, just with a 957 // We will simply re-use the UpdateRect unblock mechanism, just with a
957 // different message. 958 // different message.
958 render_widget_helper_->DidReceiveBackingStoreMsg(msg); 959 render_widget_helper_->DidReceiveBackingStoreMsg(msg);
959 } 960 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698