Merge revision 1007 changes:

- Allow empty |mimeType| argument to GetDownloadHandler  (issue #405).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1364@1008 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2013-01-17 18:48:17 +00:00
parent 08f7a4bcc2
commit 6990820200
3 changed files with 3 additions and 9 deletions

View File

@ -132,7 +132,7 @@ class CefRequestHandler : public virtual CefBase {
// CefDownloadHandler instance that will recieve the file contents. Return
// true to download the file or false to cancel the file download.
///
/*--cef()--*/
/*--cef(optional_param=mimeType)--*/
virtual bool GetDownloadHandler(CefRefPtr<CefBrowser> browser,
const CefString& mimeType,
const CefString& fileName,

View File

@ -254,10 +254,6 @@ int CEF_CALLBACK request_handler_get_download_handler(
DCHECK(browser);
if (!browser)
return 0;
// Verify param: mimeType; type: string_byref_const
DCHECK(mimeType);
if (!mimeType)
return 0;
// Verify param: fileName; type: string_byref_const
DCHECK(fileName);
if (!fileName)
@ -266,6 +262,7 @@ int CEF_CALLBACK request_handler_get_download_handler(
DCHECK(handler);
if (!handler)
return 0;
// Unverified params: mimeType
// Translate param: handler; type: refptr_same_byref
CefRefPtr<CefDownloadHandler> handlerPtr;

View File

@ -217,14 +217,11 @@ bool CefRequestHandlerCToCpp::GetDownloadHandler(CefRefPtr<CefBrowser> browser,
DCHECK(browser.get());
if (!browser.get())
return false;
// Verify param: mimeType; type: string_byref_const
DCHECK(!mimeType.empty());
if (mimeType.empty())
return false;
// Verify param: fileName; type: string_byref_const
DCHECK(!fileName.empty());
if (fileName.empty())
return false;
// Unverified params: mimeType
// Translate param: handler; type: refptr_same_byref
cef_download_handler_t* handlerStruct = NULL;