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

Unified Diff: Source/web/StorageAreaProxy.cpp

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 years, 1 month 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/web/SharedWorkerRepositoryClientImpl.cpp ('k') | Source/web/WebDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/StorageAreaProxy.cpp
diff --git a/Source/web/StorageAreaProxy.cpp b/Source/web/StorageAreaProxy.cpp
index cad316db366ec22ecce2378e83f8a5478dd00c92..36a2eb0d42fd036d18a6cf2138ff016ce2b4696b 100644
--- a/Source/web/StorageAreaProxy.cpp
+++ b/Source/web/StorageAreaProxy.cpp
@@ -63,70 +63,70 @@ StorageAreaProxy::~StorageAreaProxy()
{
}
-unsigned StorageAreaProxy::length(ExceptionState& es, Frame* frame)
+unsigned StorageAreaProxy::length(ExceptionState& exceptionState, Frame* frame)
{
if (!canAccessStorage(frame)) {
- es.throwSecurityError(ExceptionMessages::failedToGet("length", "Storage", "access is denied for this document."));
+ exceptionState.throwSecurityError(ExceptionMessages::failedToGet("length", "Storage", "access is denied for this document."));
return 0;
}
return m_storageArea->length();
}
-String StorageAreaProxy::key(unsigned index, ExceptionState& es, Frame* frame)
+String StorageAreaProxy::key(unsigned index, ExceptionState& exceptionState, Frame* frame)
{
if (!canAccessStorage(frame)) {
- es.throwSecurityError(ExceptionMessages::failedToExecute("length", "Storage", "access is denied for this document."));
+ exceptionState.throwSecurityError(ExceptionMessages::failedToExecute("length", "Storage", "access is denied for this document."));
return String();
}
return m_storageArea->key(index);
}
-String StorageAreaProxy::getItem(const String& key, ExceptionState& es, Frame* frame)
+String StorageAreaProxy::getItem(const String& key, ExceptionState& exceptionState, Frame* frame)
{
if (!canAccessStorage(frame)) {
- es.throwSecurityError(ExceptionMessages::failedToExecute("getItem", "Storage", "access is denied for this document."));
+ exceptionState.throwSecurityError(ExceptionMessages::failedToExecute("getItem", "Storage", "access is denied for this document."));
return String();
}
return m_storageArea->getItem(key);
}
-void StorageAreaProxy::setItem(const String& key, const String& value, ExceptionState& es, Frame* frame)
+void StorageAreaProxy::setItem(const String& key, const String& value, ExceptionState& exceptionState, Frame* frame)
{
if (!canAccessStorage(frame)) {
- es.throwSecurityError(ExceptionMessages::failedToExecute("setItem", "Storage", "access is denied for this document."));
+ exceptionState.throwSecurityError(ExceptionMessages::failedToExecute("setItem", "Storage", "access is denied for this document."));
return;
}
blink::WebStorageArea::Result result = blink::WebStorageArea::ResultOK;
m_storageArea->setItem(key, value, frame->document()->url(), result);
if (result != blink::WebStorageArea::ResultOK)
- es.throwDOMException(QuotaExceededError, ExceptionMessages::failedToExecute("setItem", "Storage", "Setting the value of '" + key + "' exceeded the quota."));
+ exceptionState.throwDOMException(QuotaExceededError, ExceptionMessages::failedToExecute("setItem", "Storage", "Setting the value of '" + key + "' exceeded the quota."));
}
-void StorageAreaProxy::removeItem(const String& key, ExceptionState& es, Frame* frame)
+void StorageAreaProxy::removeItem(const String& key, ExceptionState& exceptionState, Frame* frame)
{
if (!canAccessStorage(frame)) {
- es.throwSecurityError(ExceptionMessages::failedToExecute("removeItem", "Storage", "access is denied for this document."));
+ exceptionState.throwSecurityError(ExceptionMessages::failedToExecute("removeItem", "Storage", "access is denied for this document."));
return;
}
m_storageArea->removeItem(key, frame->document()->url());
}
-void StorageAreaProxy::clear(ExceptionState& es, Frame* frame)
+void StorageAreaProxy::clear(ExceptionState& exceptionState, Frame* frame)
{
if (!canAccessStorage(frame)) {
- es.throwSecurityError(ExceptionMessages::failedToExecute("clear", "Storage", "access is denied for this document."));
+ exceptionState.throwSecurityError(ExceptionMessages::failedToExecute("clear", "Storage", "access is denied for this document."));
return;
}
m_storageArea->clear(frame->document()->url());
}
-bool StorageAreaProxy::contains(const String& key, ExceptionState& es, Frame* frame)
+bool StorageAreaProxy::contains(const String& key, ExceptionState& exceptionState, Frame* frame)
{
if (!canAccessStorage(frame)) {
- es.throwSecurityError(ExceptionMessages::failedToExecute("contains", "Storage", "access is denied for this document."));
+ exceptionState.throwSecurityError(ExceptionMessages::failedToExecute("contains", "Storage", "access is denied for this document."));
return false;
}
- return !getItem(key, es, frame).isNull();
+ return !getItem(key, exceptionState, frame).isNull();
}
bool StorageAreaProxy::canAccessStorage(Frame* frame)
« no previous file with comments | « Source/web/SharedWorkerRepositoryClientImpl.cpp ('k') | Source/web/WebDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698