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

Unified Diff: chrome/renderer/content_settings_observer.cc

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 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 | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/extensions/app_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/content_settings_observer.cc
diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc
index 129c3f1fcdbabaa73dd96fa8119a82ac1ed09b2a..2e48be56122421ad169c48629000ce9051e82c19 100644
--- a/chrome/renderer/content_settings_observer.cc
+++ b/chrome/renderer/content_settings_observer.cc
@@ -92,7 +92,7 @@ static const char kDotSWF[] = ".swf";
static const char kDotHTML[] = ".html";
GURL GetOriginOrURL(const WebFrame* frame) {
- WebString top_origin = frame->top()->securityOrigin().toString();
+ WebString top_origin = frame->top()->getSecurityOrigin().toString();
// The |top_origin| is unique ("null") e.g., for file:// URLs. Use the
// document URL as the primary URL in those cases.
// TODO(alexmos): This is broken for --site-per-process, since top() can be a
@@ -247,7 +247,7 @@ void ContentSettingsObserver::DidCommitProvisionalLoad(
GURL url = frame->document().url();
// If we start failing this DCHECK, please makes sure we don't regress
// this bug: http://code.google.com/p/chromium/issues/detail?id=79304
- DCHECK(frame->document().securityOrigin().toString() == "null" ||
+ DCHECK(frame->document().getSecurityOrigin().toString() == "null" ||
!url.SchemeIs(url::kDataScheme));
}
@@ -255,15 +255,15 @@ bool ContentSettingsObserver::allowDatabase(const WebString& name,
const WebString& display_name,
unsigned long estimated_size) {
WebFrame* frame = render_frame()->GetWebFrame();
- if (frame->securityOrigin().isUnique() ||
- frame->top()->securityOrigin().isUnique())
+ if (frame->getSecurityOrigin().isUnique() ||
+ frame->top()->getSecurityOrigin().isUnique())
return false;
bool result = false;
Send(new ChromeViewHostMsg_AllowDatabase(
routing_id(),
- blink::WebStringToGURL(frame->securityOrigin().toString()),
- blink::WebStringToGURL(frame->top()->securityOrigin().toString()),
+ blink::WebStringToGURL(frame->getSecurityOrigin().toString()),
+ blink::WebStringToGURL(frame->top()->getSecurityOrigin().toString()),
name, display_name, &result));
return result;
}
@@ -271,8 +271,8 @@ bool ContentSettingsObserver::allowDatabase(const WebString& name,
void ContentSettingsObserver::requestFileSystemAccessAsync(
const WebContentSettingCallbacks& callbacks) {
WebFrame* frame = render_frame()->GetWebFrame();
- if (frame->securityOrigin().isUnique() ||
- frame->top()->securityOrigin().isUnique()) {
+ if (frame->getSecurityOrigin().isUnique() ||
+ frame->top()->getSecurityOrigin().isUnique()) {
WebContentSettingCallbacks permissionCallbacks(callbacks);
permissionCallbacks.doDeny();
return;
@@ -287,8 +287,8 @@ void ContentSettingsObserver::requestFileSystemAccessAsync(
Send(new ChromeViewHostMsg_RequestFileSystemAccessAsync(
routing_id(), current_request_id_,
- blink::WebStringToGURL(frame->securityOrigin().toString()),
- blink::WebStringToGURL(frame->top()->securityOrigin().toString())));
+ blink::WebStringToGURL(frame->getSecurityOrigin().toString()),
+ blink::WebStringToGURL(frame->top()->getSecurityOrigin().toString())));
}
bool ContentSettingsObserver::allowImage(bool enabled_per_settings,
@@ -317,15 +317,15 @@ bool ContentSettingsObserver::allowImage(bool enabled_per_settings,
bool ContentSettingsObserver::allowIndexedDB(const WebString& name,
const WebSecurityOrigin& origin) {
WebFrame* frame = render_frame()->GetWebFrame();
- if (frame->securityOrigin().isUnique() ||
- frame->top()->securityOrigin().isUnique())
+ if (frame->getSecurityOrigin().isUnique() ||
+ frame->top()->getSecurityOrigin().isUnique())
return false;
bool result = false;
Send(new ChromeViewHostMsg_AllowIndexedDB(
routing_id(),
- blink::WebStringToGURL(frame->securityOrigin().toString()),
- blink::WebStringToGURL(frame->top()->securityOrigin().toString()),
+ blink::WebStringToGURL(frame->getSecurityOrigin().toString()),
+ blink::WebStringToGURL(frame->top()->getSecurityOrigin().toString()),
name, &result));
return result;
}
@@ -352,10 +352,9 @@ bool ContentSettingsObserver::allowScript(bool enabled_per_settings) {
bool allow = true;
if (content_setting_rules_) {
ContentSetting setting = GetContentSettingFromRules(
- content_setting_rules_->script_rules,
- frame,
+ content_setting_rules_->script_rules, frame,
blink::WebStringToGURL(
- frame->document().securityOrigin().toString()));
+ frame->document().getSecurityOrigin().toString()));
allow = setting != CONTENT_SETTING_BLOCK;
}
allow = allow || IsWhitelistedForContentSettings();
@@ -385,13 +384,13 @@ bool ContentSettingsObserver::allowScriptFromSource(
bool ContentSettingsObserver::allowStorage(bool local) {
WebFrame* frame = render_frame()->GetWebFrame();
- if (frame->securityOrigin().isUnique() ||
- frame->top()->securityOrigin().isUnique())
+ if (frame->getSecurityOrigin().isUnique() ||
+ frame->top()->getSecurityOrigin().isUnique())
return false;
bool result = false;
StoragePermissionsKey key(
- blink::WebStringToGURL(frame->document().securityOrigin().toString()),
+ blink::WebStringToGURL(frame->document().getSecurityOrigin().toString()),
local);
std::map<StoragePermissionsKey, bool>::const_iterator permissions =
cached_storage_permissions_.find(key);
@@ -400,8 +399,8 @@ bool ContentSettingsObserver::allowStorage(bool local) {
Send(new ChromeViewHostMsg_AllowDOMStorage(
routing_id(),
- blink::WebStringToGURL(frame->securityOrigin().toString()),
- blink::WebStringToGURL(frame->top()->securityOrigin().toString()),
+ blink::WebStringToGURL(frame->getSecurityOrigin().toString()),
+ blink::WebStringToGURL(frame->top()->getSecurityOrigin().toString()),
local, &result));
cached_storage_permissions_[key] = result;
return result;
@@ -494,7 +493,7 @@ void ContentSettingsObserver::didUseKeygen() {
WebFrame* frame = render_frame()->GetWebFrame();
Send(new ChromeViewHostMsg_DidUseKeygen(
routing_id(),
- blink::WebStringToGURL(frame->securityOrigin().toString())));
+ blink::WebStringToGURL(frame->getSecurityOrigin().toString())));
}
void ContentSettingsObserver::didNotAllowPlugins() {
@@ -563,7 +562,7 @@ void ContentSettingsObserver::ClearBlockedContentSettings() {
bool ContentSettingsObserver::IsPlatformApp() {
#if defined(ENABLE_EXTENSIONS)
WebFrame* frame = render_frame()->GetWebFrame();
- WebSecurityOrigin origin = frame->document().securityOrigin();
+ WebSecurityOrigin origin = frame->document().getSecurityOrigin();
const extensions::Extension* extension = GetExtension(origin);
return extension && extension->is_platform_app();
#else
@@ -596,8 +595,8 @@ bool ContentSettingsObserver::IsWhitelistedForContentSettings() const {
return true;
WebFrame* web_frame = render_frame()->GetWebFrame();
- return IsWhitelistedForContentSettings(web_frame->document().securityOrigin(),
- web_frame->document().url());
+ return IsWhitelistedForContentSettings(
+ web_frame->document().getSecurityOrigin(), web_frame->document().url());
}
bool ContentSettingsObserver::IsWhitelistedForContentSettings(
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/extensions/app_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698