예제 #1
0
CookieManager::CookieManager()
    : m_count(0)
{
    m_cookieJarFileName = pathByAppendingComponent(OWB_DATA, "cookieCollection.db");

    // We force the cookie backing store to be open with the cookie jar to avoid
    // calling cookieManager() again and recursively calling this constructor.
    cookieBackingStore().open(cookieJar());
    getBackingStoreCookies();
}
예제 #2
0
void CookieManager::setPrivateMode(bool mode)
{
    if (m_privateMode == mode)
        return;

    m_privateMode = mode;
    if (!mode) {
        removeAllCookies(DoNotRemoveFromBackingStore);
        getBackingStoreCookies();
    }
}
예제 #3
0
void CookieManager::setPrivateMode(bool privateMode)
{
    if (m_privateMode == privateMode)
        return;

    m_privateMode = privateMode;

    removeAllCookies(DoNotRemoveFromBackingStore);

    // If we are switching back to public mode, reload the database to memory.
    if (!m_privateMode)
        getBackingStoreCookies();
}
예제 #4
0
void CookieManager::setPrivateMode(bool privateMode)
{
    if (m_privateMode == privateMode)
        return;

    m_privateMode = privateMode;

    // If we switched to private mode when the database cookies haven't loaded into memory yet
    // we can return because there's nothing in memory anyway.
    if (m_privateMode && !m_syncedWithDatabase)
        return;

    removeAllCookies(DoNotRemoveFromBackingStore);

    // If we are switching back to public mode, reload the database to memory.
    if (!m_privateMode)
        getBackingStoreCookies();
}