mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Don't save or load cookies for non-cookieable scheme requests.
This fixes an IsCanonical() DCHECK failure triggered by calling CanonicalCookie::Create for a non-cookieable URL. This change also adds unit test coverage for cross-origin cookie behavior with sub-resource requests (iframe, XHR, Fetch).
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "include/base/cef_bind.h"
|
||||
#include "include/cef_cookie.h"
|
||||
#include "include/cef_frame.h"
|
||||
#include "include/cef_request.h"
|
||||
#include "include/cef_request_context.h"
|
||||
@@ -73,6 +74,23 @@ CefRefPtr<CefResourceHandler> CreateResourceHandler(
|
||||
CefRefPtr<CefResponse> response,
|
||||
const std::string& response_data);
|
||||
|
||||
typedef std::vector<CefCookie> CookieVector;
|
||||
typedef base::Callback<void(const CookieVector& cookies)> CookieDoneCallback;
|
||||
|
||||
// Retrieves all cookies from |manager| and executes |callback| upon completion.
|
||||
// If |deleteCookies| is true the cookies will also be deleted.
|
||||
void GetAllCookies(CefRefPtr<CefCookieManager> manager,
|
||||
bool deleteCookies,
|
||||
const CookieDoneCallback& callback);
|
||||
|
||||
// Retrieves URL cookies from |manager| and executes |callback| upon completion.
|
||||
// If |deleteCookies| is true the cookies will also be deleted.
|
||||
void GetUrlCookies(CefRefPtr<CefCookieManager> manager,
|
||||
const CefString& url,
|
||||
bool includeHttpOnly,
|
||||
bool deleteCookies,
|
||||
const CookieDoneCallback& callback);
|
||||
|
||||
} // namespace test_request
|
||||
|
||||
#endif // CEF_TESTS_CEFTESTS_TEST_REQUEST_H_
|
||||
|
Reference in New Issue
Block a user