Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: Source/WebCore/storage/StorageAreaImpl.cpp

Issue 13861033: Remove Apple's unused implementation of private browsing from WebCore (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Repatch to ToT Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/storage/StorageAreaImpl.h ('k') | Source/modules/webdatabase/DatabaseContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/storage/StorageAreaImpl.cpp
diff --git a/Source/WebCore/storage/StorageAreaImpl.cpp b/Source/WebCore/storage/StorageAreaImpl.cpp
index 330c3faa56bfdea2f5737c429bb83dc080a0f909..fa66baee4765ce838a281e49fcdf3def08ca6262 100644
--- a/Source/WebCore/storage/StorageAreaImpl.cpp
+++ b/Source/WebCore/storage/StorageAreaImpl.cpp
@@ -109,15 +109,6 @@ bool StorageAreaImpl::canAccessStorage(Frame* frame)
return frame && frame->page();
}
-bool StorageAreaImpl::disabledByPrivateBrowsingInFrame(const Frame* frame) const
-{
- if (!frame->page()->settings()->privateBrowsingEnabled())
- return false;
- if (m_storageType != LocalStorage)
- return true;
- return !SchemeRegistry::allowsLocalStorageAccessInPrivateBrowsing(frame->document()->securityOrigin()->protocol());
-}
-
unsigned StorageAreaImpl::length(ExceptionCode& ec, Frame* frame)
{
ec = 0;
@@ -125,8 +116,6 @@ unsigned StorageAreaImpl::length(ExceptionCode& ec, Frame* frame)
ec = SECURITY_ERR;
return 0;
}
- if (disabledByPrivateBrowsingInFrame(frame))
- return 0;
ASSERT(!m_isShutdown);
blockUntilImportComplete();
@@ -141,8 +130,6 @@ String StorageAreaImpl::key(unsigned index, ExceptionCode& ec, Frame* frame)
ec = SECURITY_ERR;
return String();
}
- if (disabledByPrivateBrowsingInFrame(frame))
- return String();
ASSERT(!m_isShutdown);
blockUntilImportComplete();
@@ -157,8 +144,6 @@ String StorageAreaImpl::getItem(const String& key, ExceptionCode& ec, Frame* fra
ec = SECURITY_ERR;
return String();
}
- if (disabledByPrivateBrowsingInFrame(frame))
- return String();
ASSERT(!m_isShutdown);
blockUntilImportComplete();
@@ -178,11 +163,6 @@ void StorageAreaImpl::setItem(const String& key, const String& value, ExceptionC
ASSERT(!value.isNull());
blockUntilImportComplete();
- if (disabledByPrivateBrowsingInFrame(frame)) {
- ec = QUOTA_EXCEEDED_ERR;
- return;
- }
-
String oldValue;
bool quotaException;
RefPtr<StorageMap> newMap = m_storageMap->setItem(key, value, oldValue, quotaException);
@@ -214,9 +194,6 @@ void StorageAreaImpl::removeItem(const String& key, ExceptionCode& ec, Frame* fr
ASSERT(!m_isShutdown);
blockUntilImportComplete();
- if (disabledByPrivateBrowsingInFrame(frame))
- return;
-
String oldValue;
RefPtr<StorageMap> newMap = m_storageMap->removeItem(key, oldValue);
if (newMap)
@@ -241,9 +218,6 @@ void StorageAreaImpl::clear(ExceptionCode& ec, Frame* frame)
ASSERT(!m_isShutdown);
blockUntilImportComplete();
- if (disabledByPrivateBrowsingInFrame(frame))
- return;
-
if (!m_storageMap->length())
return;
@@ -262,8 +236,6 @@ bool StorageAreaImpl::contains(const String& key, ExceptionCode& ec, Frame* fram
ec = SECURITY_ERR;
return false;
}
- if (disabledByPrivateBrowsingInFrame(frame))
- return false;
ASSERT(!m_isShutdown);
blockUntilImportComplete();
« no previous file with comments | « Source/WebCore/storage/StorageAreaImpl.h ('k') | Source/modules/webdatabase/DatabaseContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698