summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-21 20:25:56 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-21 20:25:56 +0000
commit753ab8c8d21fcc639be10d024335c1acf3d3aa44 (patch)
tree7c5faa7aa1ae494b9123c0a98dddee46aa85fc65
parentd99038c41d98fe53d49690aef6fe4d0d9b1af58d (diff)
downloadchromium_src-753ab8c8d21fcc639be10d024335c1acf3d3aa44.zip
chromium_src-753ab8c8d21fcc639be10d024335c1acf3d3aa44.tar.gz
chromium_src-753ab8c8d21fcc639be10d024335c1acf3d3aa44.tar.bz2
Update callers of WebSecurityOrigin::isEmpty to call WebSecurityOrigin::isUnique
isUnique is the new name for isEmpty. Review URL: http://codereview.chromium.org/8604008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110992 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/renderer/content_settings_observer.cc26
-rw-r--r--content/renderer/render_view_impl.cc12
-rw-r--r--content/worker/webworkerclient_proxy.cc2
3 files changed, 20 insertions, 20 deletions
diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc
index d6a912c..13ba6f5 100644
--- a/chrome/renderer/content_settings_observer.cc
+++ b/chrome/renderer/content_settings_observer.cc
@@ -32,7 +32,7 @@ namespace {
// True if |frame| contains content that is white-listed for content settings.
static bool IsWhitelistedForContentSettings(WebFrame* frame) {
WebSecurityOrigin origin = frame->document().securityOrigin();
- if (origin.isEmpty())
+ if (origin.isUnique())
return false; // Uninitialized document?
if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme))
@@ -161,9 +161,9 @@ bool ContentSettingsObserver::AllowDatabase(WebFrame* frame,
const WebString& name,
const WebString& display_name,
unsigned long estimated_size) {
- if (frame->document().securityOrigin().isEmpty() ||
- frame->top()->document().securityOrigin().isEmpty())
- return false; // Uninitialized document.
+ if (frame->document().securityOrigin().isUnique() ||
+ frame->top()->document().securityOrigin().isUnique())
+ return false;
bool result = false;
Send(new ChromeViewHostMsg_AllowDatabase(
@@ -174,9 +174,9 @@ bool ContentSettingsObserver::AllowDatabase(WebFrame* frame,
}
bool ContentSettingsObserver::AllowFileSystem(WebFrame* frame) {
- if (frame->document().securityOrigin().isEmpty() ||
- frame->top()->document().securityOrigin().isEmpty())
- return false; // Uninitialized document.
+ if (frame->document().securityOrigin().isUnique() ||
+ frame->top()->document().securityOrigin().isUnique())
+ return false;
bool result = false;
Send(new ChromeViewHostMsg_AllowFileSystem(
@@ -207,9 +207,9 @@ bool ContentSettingsObserver::AllowImage(WebFrame* frame,
bool ContentSettingsObserver::AllowIndexedDB(WebFrame* frame,
const WebString& name,
const WebSecurityOrigin& origin) {
- if (frame->document().securityOrigin().isEmpty() ||
- frame->top()->document().securityOrigin().isEmpty())
- return false; // Uninitialized document.
+ if (frame->document().securityOrigin().isUnique() ||
+ frame->top()->document().securityOrigin().isUnique())
+ return false;
bool result = false;
Send(new ChromeViewHostMsg_AllowIndexedDB(
@@ -270,9 +270,9 @@ bool ContentSettingsObserver::AllowScriptFromSource(
}
bool ContentSettingsObserver::AllowStorage(WebFrame* frame, bool local) {
- if (frame->document().securityOrigin().isEmpty() ||
- frame->top()->document().securityOrigin().isEmpty())
- return false; // Uninitialized document.
+ if (frame->document().securityOrigin().isUnique() ||
+ frame->top()->document().securityOrigin().isUnique())
+ return false;
bool result = false;
StoragePermissionsKey key(
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 9f3d137..e3833d4 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -2975,8 +2975,8 @@ void RenderViewImpl::openFileSystem(
DCHECK(callbacks);
WebSecurityOrigin origin = frame->document().securityOrigin();
- if (origin.isEmpty()) {
- // Uninitialized document?
+ if (origin.isUnique()) {
+ // Unique origins cannot store persistent state.
callbacks->didFail(WebKit::WebFileErrorAbort);
return;
}
@@ -2992,8 +2992,8 @@ void RenderViewImpl::queryStorageUsageAndQuota(
WebStorageQuotaCallbacks* callbacks) {
DCHECK(frame);
WebSecurityOrigin origin = frame->document().securityOrigin();
- if (origin.isEmpty()) {
- // Uninitialized document?
+ if (origin.isUnique()) {
+ // Unique origins cannot store persistent state.
callbacks->didFail(WebKit::WebStorageQuotaErrorAbort);
return;
}
@@ -3010,8 +3010,8 @@ void RenderViewImpl::requestStorageQuota(
WebStorageQuotaCallbacks* callbacks) {
DCHECK(frame);
WebSecurityOrigin origin = frame->document().securityOrigin();
- if (origin.isEmpty()) {
- // Uninitialized document?
+ if (origin.isUnique()) {
+ // Unique origins cannot store persistent state.
callbacks->didFail(WebKit::WebStorageQuotaErrorAbort);
return;
}
diff --git a/content/worker/webworkerclient_proxy.cc b/content/worker/webworkerclient_proxy.cc
index 42c15b3..529a602 100644
--- a/content/worker/webworkerclient_proxy.cc
+++ b/content/worker/webworkerclient_proxy.cc
@@ -153,7 +153,7 @@ bool WebWorkerClientProxy::allowDatabase(WebFrame* frame,
const WebString& display_name,
unsigned long estimated_size) {
WebSecurityOrigin origin = frame->document().securityOrigin();
- if (origin.isEmpty())
+ if (origin.isUnique())
return false;
bool result = false;