Commit 753ab8c8 authored by abarth@chromium.org's avatar abarth@chromium.org

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
parent d99038c4
...@@ -32,7 +32,7 @@ namespace { ...@@ -32,7 +32,7 @@ namespace {
// True if |frame| contains content that is white-listed for content settings. // True if |frame| contains content that is white-listed for content settings.
static bool IsWhitelistedForContentSettings(WebFrame* frame) { static bool IsWhitelistedForContentSettings(WebFrame* frame) {
WebSecurityOrigin origin = frame->document().securityOrigin(); WebSecurityOrigin origin = frame->document().securityOrigin();
if (origin.isEmpty()) if (origin.isUnique())
return false; // Uninitialized document? return false; // Uninitialized document?
if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme)) if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme))
...@@ -161,9 +161,9 @@ bool ContentSettingsObserver::AllowDatabase(WebFrame* frame, ...@@ -161,9 +161,9 @@ bool ContentSettingsObserver::AllowDatabase(WebFrame* frame,
const WebString& name, const WebString& name,
const WebString& display_name, const WebString& display_name,
unsigned long estimated_size) { unsigned long estimated_size) {
if (frame->document().securityOrigin().isEmpty() || if (frame->document().securityOrigin().isUnique() ||
frame->top()->document().securityOrigin().isEmpty()) frame->top()->document().securityOrigin().isUnique())
return false; // Uninitialized document. return false;
bool result = false; bool result = false;
Send(new ChromeViewHostMsg_AllowDatabase( Send(new ChromeViewHostMsg_AllowDatabase(
...@@ -174,9 +174,9 @@ bool ContentSettingsObserver::AllowDatabase(WebFrame* frame, ...@@ -174,9 +174,9 @@ bool ContentSettingsObserver::AllowDatabase(WebFrame* frame,
} }
bool ContentSettingsObserver::AllowFileSystem(WebFrame* frame) { bool ContentSettingsObserver::AllowFileSystem(WebFrame* frame) {
if (frame->document().securityOrigin().isEmpty() || if (frame->document().securityOrigin().isUnique() ||
frame->top()->document().securityOrigin().isEmpty()) frame->top()->document().securityOrigin().isUnique())
return false; // Uninitialized document. return false;
bool result = false; bool result = false;
Send(new ChromeViewHostMsg_AllowFileSystem( Send(new ChromeViewHostMsg_AllowFileSystem(
...@@ -207,9 +207,9 @@ bool ContentSettingsObserver::AllowImage(WebFrame* frame, ...@@ -207,9 +207,9 @@ bool ContentSettingsObserver::AllowImage(WebFrame* frame,
bool ContentSettingsObserver::AllowIndexedDB(WebFrame* frame, bool ContentSettingsObserver::AllowIndexedDB(WebFrame* frame,
const WebString& name, const WebString& name,
const WebSecurityOrigin& origin) { const WebSecurityOrigin& origin) {
if (frame->document().securityOrigin().isEmpty() || if (frame->document().securityOrigin().isUnique() ||
frame->top()->document().securityOrigin().isEmpty()) frame->top()->document().securityOrigin().isUnique())
return false; // Uninitialized document. return false;
bool result = false; bool result = false;
Send(new ChromeViewHostMsg_AllowIndexedDB( Send(new ChromeViewHostMsg_AllowIndexedDB(
...@@ -270,9 +270,9 @@ bool ContentSettingsObserver::AllowScriptFromSource( ...@@ -270,9 +270,9 @@ bool ContentSettingsObserver::AllowScriptFromSource(
} }
bool ContentSettingsObserver::AllowStorage(WebFrame* frame, bool local) { bool ContentSettingsObserver::AllowStorage(WebFrame* frame, bool local) {
if (frame->document().securityOrigin().isEmpty() || if (frame->document().securityOrigin().isUnique() ||
frame->top()->document().securityOrigin().isEmpty()) frame->top()->document().securityOrigin().isUnique())
return false; // Uninitialized document. return false;
bool result = false; bool result = false;
StoragePermissionsKey key( StoragePermissionsKey key(
......
...@@ -2975,8 +2975,8 @@ void RenderViewImpl::openFileSystem( ...@@ -2975,8 +2975,8 @@ void RenderViewImpl::openFileSystem(
DCHECK(callbacks); DCHECK(callbacks);
WebSecurityOrigin origin = frame->document().securityOrigin(); WebSecurityOrigin origin = frame->document().securityOrigin();
if (origin.isEmpty()) { if (origin.isUnique()) {
// Uninitialized document? // Unique origins cannot store persistent state.
callbacks->didFail(WebKit::WebFileErrorAbort); callbacks->didFail(WebKit::WebFileErrorAbort);
return; return;
} }
...@@ -2992,8 +2992,8 @@ void RenderViewImpl::queryStorageUsageAndQuota( ...@@ -2992,8 +2992,8 @@ void RenderViewImpl::queryStorageUsageAndQuota(
WebStorageQuotaCallbacks* callbacks) { WebStorageQuotaCallbacks* callbacks) {
DCHECK(frame); DCHECK(frame);
WebSecurityOrigin origin = frame->document().securityOrigin(); WebSecurityOrigin origin = frame->document().securityOrigin();
if (origin.isEmpty()) { if (origin.isUnique()) {
// Uninitialized document? // Unique origins cannot store persistent state.
callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); callbacks->didFail(WebKit::WebStorageQuotaErrorAbort);
return; return;
} }
...@@ -3010,8 +3010,8 @@ void RenderViewImpl::requestStorageQuota( ...@@ -3010,8 +3010,8 @@ void RenderViewImpl::requestStorageQuota(
WebStorageQuotaCallbacks* callbacks) { WebStorageQuotaCallbacks* callbacks) {
DCHECK(frame); DCHECK(frame);
WebSecurityOrigin origin = frame->document().securityOrigin(); WebSecurityOrigin origin = frame->document().securityOrigin();
if (origin.isEmpty()) { if (origin.isUnique()) {
// Uninitialized document? // Unique origins cannot store persistent state.
callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); callbacks->didFail(WebKit::WebStorageQuotaErrorAbort);
return; return;
} }
......
...@@ -153,7 +153,7 @@ bool WebWorkerClientProxy::allowDatabase(WebFrame* frame, ...@@ -153,7 +153,7 @@ bool WebWorkerClientProxy::allowDatabase(WebFrame* frame,
const WebString& display_name, const WebString& display_name,
unsigned long estimated_size) { unsigned long estimated_size) {
WebSecurityOrigin origin = frame->document().securityOrigin(); WebSecurityOrigin origin = frame->document().securityOrigin();
if (origin.isEmpty()) if (origin.isUnique())
return false; return false;
bool result = false; bool result = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment