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(); }
void CookieManager::setPrivateMode(bool mode) { if (m_privateMode == mode) return; m_privateMode = mode; if (!mode) { removeAllCookies(DoNotRemoveFromBackingStore); getBackingStoreCookies(); } }
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(); }
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(); }