mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Wait for CefBrowserContext initialization (see issue #2969)
With the Chrome runtime, Profile initialization may be asynchronous. Code that waited on CefBrowserContext creation now needs to wait on CefBrowserContext initialization instead.
This commit is contained in:
@ -36,9 +36,30 @@ class CefCookieManagerImpl : public CefCookieManager {
|
||||
bool FlushStore(CefRefPtr<CefCompletionCallback> callback) override;
|
||||
|
||||
private:
|
||||
bool VisitAllCookiesInternal(CefRefPtr<CefCookieVisitor> visitor);
|
||||
bool VisitUrlCookiesInternal(const GURL& url,
|
||||
bool includeHttpOnly,
|
||||
CefRefPtr<CefCookieVisitor> visitor);
|
||||
bool SetCookieInternal(const GURL& url,
|
||||
const CefCookie& cookie,
|
||||
CefRefPtr<CefSetCookieCallback> callback);
|
||||
bool DeleteCookiesInternal(const GURL& url,
|
||||
const CefString& cookie_name,
|
||||
CefRefPtr<CefDeleteCookiesCallback> callback);
|
||||
bool FlushStoreInternal(CefRefPtr<CefCompletionCallback> callback);
|
||||
|
||||
// If the context is fully initialized execute |callback|, otherwise
|
||||
// store it until the context is fully initialized.
|
||||
void StoreOrTriggerInitCallback(base::OnceClosure callback);
|
||||
|
||||
bool ValidContext() const;
|
||||
|
||||
// Only accessed on the UI thread. Will be non-null after Initialize().
|
||||
CefBrowserContext::Getter browser_context_getter_;
|
||||
|
||||
bool initialized_ = false;
|
||||
std::vector<base::OnceClosure> init_callbacks_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefCookieManagerImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefCookieManagerImpl);
|
||||
};
|
||||
|
Reference in New Issue
Block a user