Allow empty |mimeType| argument to GetDownloadHandler (issue #405).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1007 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
e91039b864
commit
53d8a95c98
|
@ -132,7 +132,7 @@ class CefRequestHandler : public virtual CefBase {
|
||||||
// CefDownloadHandler instance that will recieve the file contents. Return
|
// CefDownloadHandler instance that will recieve the file contents. Return
|
||||||
// true to download the file or false to cancel the file download.
|
// true to download the file or false to cancel the file download.
|
||||||
///
|
///
|
||||||
/*--cef()--*/
|
/*--cef(optional_param=mimeType)--*/
|
||||||
virtual bool GetDownloadHandler(CefRefPtr<CefBrowser> browser,
|
virtual bool GetDownloadHandler(CefRefPtr<CefBrowser> browser,
|
||||||
const CefString& mimeType,
|
const CefString& mimeType,
|
||||||
const CefString& fileName,
|
const CefString& fileName,
|
||||||
|
|
|
@ -254,10 +254,6 @@ int CEF_CALLBACK request_handler_get_download_handler(
|
||||||
DCHECK(browser);
|
DCHECK(browser);
|
||||||
if (!browser)
|
if (!browser)
|
||||||
return 0;
|
return 0;
|
||||||
// Verify param: mimeType; type: string_byref_const
|
|
||||||
DCHECK(mimeType);
|
|
||||||
if (!mimeType)
|
|
||||||
return 0;
|
|
||||||
// Verify param: fileName; type: string_byref_const
|
// Verify param: fileName; type: string_byref_const
|
||||||
DCHECK(fileName);
|
DCHECK(fileName);
|
||||||
if (!fileName)
|
if (!fileName)
|
||||||
|
@ -266,6 +262,7 @@ int CEF_CALLBACK request_handler_get_download_handler(
|
||||||
DCHECK(handler);
|
DCHECK(handler);
|
||||||
if (!handler)
|
if (!handler)
|
||||||
return 0;
|
return 0;
|
||||||
|
// Unverified params: mimeType
|
||||||
|
|
||||||
// Translate param: handler; type: refptr_same_byref
|
// Translate param: handler; type: refptr_same_byref
|
||||||
CefRefPtr<CefDownloadHandler> handlerPtr;
|
CefRefPtr<CefDownloadHandler> handlerPtr;
|
||||||
|
|
|
@ -217,14 +217,11 @@ bool CefRequestHandlerCToCpp::GetDownloadHandler(CefRefPtr<CefBrowser> browser,
|
||||||
DCHECK(browser.get());
|
DCHECK(browser.get());
|
||||||
if (!browser.get())
|
if (!browser.get())
|
||||||
return false;
|
return false;
|
||||||
// Verify param: mimeType; type: string_byref_const
|
|
||||||
DCHECK(!mimeType.empty());
|
|
||||||
if (mimeType.empty())
|
|
||||||
return false;
|
|
||||||
// Verify param: fileName; type: string_byref_const
|
// Verify param: fileName; type: string_byref_const
|
||||||
DCHECK(!fileName.empty());
|
DCHECK(!fileName.empty());
|
||||||
if (fileName.empty())
|
if (fileName.empty())
|
||||||
return false;
|
return false;
|
||||||
|
// Unverified params: mimeType
|
||||||
|
|
||||||
// Translate param: handler; type: refptr_same_byref
|
// Translate param: handler; type: refptr_same_byref
|
||||||
cef_download_handler_t* handlerStruct = NULL;
|
cef_download_handler_t* handlerStruct = NULL;
|
||||||
|
|
Loading…
Reference in New Issue