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

Side by Side Diff: content/public/browser/resource_dispatcher_host.h

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 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "content/public/browser/download_id.h" 10 #include "content/public/browser/download_id.h"
(...skipping 19 matching lines...) Expand all
30 // delegate have a longer lifetime than the ResourceDispatcherHost. 30 // delegate have a longer lifetime than the ResourceDispatcherHost.
31 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) = 0; 31 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) = 0;
32 32
33 // Controls whether third-party sub-content can pop-up HTTP basic auth 33 // Controls whether third-party sub-content can pop-up HTTP basic auth
34 // dialog boxes. 34 // dialog boxes.
35 virtual void SetAllowCrossOriginAuthPrompt(bool value) = 0; 35 virtual void SetAllowCrossOriginAuthPrompt(bool value) = 0;
36 36
37 // Initiates a download by explicit request of the renderer, e.g. due to 37 // Initiates a download by explicit request of the renderer, e.g. due to
38 // alt-clicking a link. If the download is started, |started_callback| will 38 // alt-clicking a link. If the download is started, |started_callback| will
39 // be called on the UI thread with the DownloadId; otherwise an error code 39 // be called on the UI thread with the DownloadId; otherwise an error code
40 // will be returned. 40 // will be returned. |is_content_initiated| is used to indicate that
41 // the request was generated from a web page, and hence may not be
42 // as trustworthy as a browser generated request.
41 virtual net::Error BeginDownload( 43 virtual net::Error BeginDownload(
42 scoped_ptr<net::URLRequest> request, 44 scoped_ptr<net::URLRequest> request,
45 bool is_content_initiated,
43 ResourceContext* context, 46 ResourceContext* context,
44 int child_id, 47 int child_id,
45 int route_id, 48 int route_id,
46 bool prefer_cache, 49 bool prefer_cache,
47 const DownloadSaveInfo& save_info, 50 const DownloadSaveInfo& save_info,
48 const DownloadStartedCallback& started_callback) = 0; 51 const DownloadStartedCallback& started_callback) = 0;
49 52
50 // Clears the ResourceDispatcherHostLoginDelegate associated with the request. 53 // Clears the ResourceDispatcherHostLoginDelegate associated with the request.
51 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0; 54 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0;
52 55
53 // Marks the request as "parked". This happens if a request is 56 // Marks the request as "parked". This happens if a request is
54 // redirected cross-site and needs to be resumed by a new render view. 57 // redirected cross-site and needs to be resumed by a new render view.
55 virtual void MarkAsTransferredNavigation(net::URLRequest* request) = 0; 58 virtual void MarkAsTransferredNavigation(net::URLRequest* request) = 0;
56 59
57 protected: 60 protected:
58 virtual ~ResourceDispatcherHost() {} 61 virtual ~ResourceDispatcherHost() {}
59 }; 62 };
60 63
61 } // namespace content 64 } // namespace content
62 65
63 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ 66 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « content/public/browser/download_url_parameters.cc ('k') | content/public/browser/resource_dispatcher_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698