diff options
author | Dana Jansens <danakj@google.com> | 2016-03-09 12:57:22 -0800 |
---|---|---|
committer | Dana Jansens <danakj@google.com> | 2016-03-09 21:00:02 +0000 |
commit | 71331253d6537b9409518dec2368388c5d73cb94 (patch) | |
tree | d3a6572ec863fe33893dd79353f17c763c4194b0 /extensions/renderer | |
parent | aa5b4809788929faac190ac72bdcac0cbb2e7fc4 (diff) | |
download | chromium_src-71331253d6537b9409518dec2368388c5d73cb94.zip chromium_src-71331253d6537b9409518dec2368388c5d73cb94.tar.gz chromium_src-71331253d6537b9409518dec2368388c5d73cb94.tar.bz2 |
blink: Rename modules/ method to prefix with get when they collide.
This focuses on modules/ to rename methods that are named foo() and
that return a Foo*, which will have collisions when foo() is renamed
to Foo() in chromium style.
This patch uses the following to do many of the replacements, so it's
a bit on the larger side..
git gs '\b$foo()'|grep '\.\(cpp\|h\|cc\):'|cut -d: -f1|sort|uniq|xargs sed -ie 's/\b$foo()/$getFoo()/g'
R=haraken@chromium.org
TBR=brettw, chrishtr
BUG=582312
Review URL: https://codereview.chromium.org/1773813007 .
Cr-Commit-Position: refs/heads/master@{#380209}
Diffstat (limited to 'extensions/renderer')
-rw-r--r-- | extensions/renderer/content_watcher.cc | 6 | ||||
-rw-r--r-- | extensions/renderer/extension_frame_helper.cc | 2 | ||||
-rw-r--r-- | extensions/renderer/extension_injection_host.cc | 2 | ||||
-rw-r--r-- | extensions/renderer/programmatic_script_injector.cc | 2 | ||||
-rw-r--r-- | extensions/renderer/script_context.cc | 4 | ||||
-rw-r--r-- | extensions/renderer/script_context.h | 2 | ||||
-rw-r--r-- | extensions/renderer/script_context_set.cc | 4 |
7 files changed, 11 insertions, 11 deletions
diff --git a/extensions/renderer/content_watcher.cc b/extensions/renderer/content_watcher.cc index 95c8a57..8c99e11 100644 --- a/extensions/renderer/content_watcher.cc +++ b/extensions/renderer/content_watcher.cc @@ -89,10 +89,10 @@ void ContentWatcher::DidMatchCSS( void ContentWatcher::NotifyBrowserOfChange( blink::WebLocalFrame* changed_frame) const { blink::WebFrame* const top_frame = changed_frame->top(); - const blink::WebSecurityOrigin top_origin = top_frame->securityOrigin(); + const blink::WebSecurityOrigin top_origin = top_frame->getSecurityOrigin(); // Want to aggregate matched selectors from all frames where an // extension with access to top_origin could run on the frame. - if (!top_origin.canAccess(changed_frame->document().securityOrigin())) { + if (!top_origin.canAccess(changed_frame->document().getSecurityOrigin())) { // If the changed frame can't be accessed by the top frame, then // no change in it could affect the set of selectors we'd send back. return; @@ -101,7 +101,7 @@ void ContentWatcher::NotifyBrowserOfChange( std::set<base::StringPiece> transitive_selectors; for (blink::WebFrame* frame = top_frame; frame; frame = frame->traverseNext(/*wrap=*/false)) { - if (top_origin.canAccess(frame->securityOrigin())) { + if (top_origin.canAccess(frame->getSecurityOrigin())) { std::map<blink::WebFrame*, std::set<std::string> >::const_iterator frame_selectors = matching_selectors_.find(frame); if (frame_selectors != matching_selectors_.end()) { diff --git a/extensions/renderer/extension_frame_helper.cc b/extensions/renderer/extension_frame_helper.cc index c063f84a..300e16e 100644 --- a/extensions/renderer/extension_frame_helper.cc +++ b/extensions/renderer/extension_frame_helper.cc @@ -44,7 +44,7 @@ bool RenderFrameMatches(const ExtensionFrameHelper* frame_helper, // This logic matches ExtensionWebContentsObserver::GetExtensionFromFrame. blink::WebSecurityOrigin origin = - frame_helper->render_frame()->GetWebFrame()->securityOrigin(); + frame_helper->render_frame()->GetWebFrame()->getSecurityOrigin(); if (origin.isUnique() || !base::EqualsASCII(base::StringPiece16(origin.protocol()), kExtensionScheme) || diff --git a/extensions/renderer/extension_injection_host.cc b/extensions/renderer/extension_injection_host.cc index 8e0d9b3..6e5b042 100644 --- a/extensions/renderer/extension_injection_host.cc +++ b/extensions/renderer/extension_injection_host.cc @@ -51,7 +51,7 @@ PermissionsData::AccessType ExtensionInjectionHost::CanExecuteOnFrame( int tab_id, bool is_declarative) const { blink::WebSecurityOrigin top_frame_security_origin = - render_frame->GetWebFrame()->top()->securityOrigin(); + render_frame->GetWebFrame()->top()->getSecurityOrigin(); // Only whitelisted extensions may run scripts on another extension's page. if (top_frame_security_origin.protocol().utf8() == kExtensionScheme && top_frame_security_origin.host().utf8() != extension_->id() && diff --git a/extensions/renderer/programmatic_script_injector.cc b/extensions/renderer/programmatic_script_injector.cc index e19a4c9..eea394b 100644 --- a/extensions/renderer/programmatic_script_injector.cc +++ b/extensions/renderer/programmatic_script_injector.cc @@ -34,7 +34,7 @@ ProgrammaticScriptInjector::ProgrammaticScriptInjector( finished_(false) { if (url_.SchemeIs(url::kAboutScheme)) { origin_for_about_error_ = - render_frame->GetWebFrame()->securityOrigin().toString().utf8(); + render_frame->GetWebFrame()->getSecurityOrigin().toString().utf8(); } } diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc index abf38d4..f6f47f3 100644 --- a/extensions/renderer/script_context.cc +++ b/extensions/renderer/script_context.cc @@ -292,8 +292,8 @@ GURL ScriptContext::GetEffectiveDocumentURL(const blink::WebFrame* frame, if (parent && !parent->document().isNull()) { // Only return the parent URL if the frame can access it. const blink::WebDocument& parent_document = parent->document(); - if (frame->document().securityOrigin().canAccess( - parent_document.securityOrigin())) { + if (frame->document().getSecurityOrigin().canAccess( + parent_document.getSecurityOrigin())) { return parent_document.url(); } } diff --git a/extensions/renderer/script_context.h b/extensions/renderer/script_context.h index b59a97f..48c873c 100644 --- a/extensions/renderer/script_context.h +++ b/extensions/renderer/script_context.h @@ -133,7 +133,7 @@ class ScriptContext : public RequestSender::Source { // Get the URL of this context's web frame. // // TODO(kalman): Remove this and replace with a GetOrigin() call which reads - // of WebDocument::securityOrigin(): + // of WebDocument::getSecurityOrigin(): // - The URL can change (e.g. pushState) but the origin cannot. Luckily it // appears as though callers don't make security decisions based on the // result of url() so it's not a problem... yet. diff --git a/extensions/renderer/script_context_set.cc b/extensions/renderer/script_context_set.cc index 18f367c..35a05b6 100644 --- a/extensions/renderer/script_context_set.cc +++ b/extensions/renderer/script_context_set.cc @@ -45,11 +45,11 @@ ScriptContext* ScriptContextSet::Register( GURL frame_url = ScriptContext::GetDataSourceURLForFrame(frame); Feature::Context context_type = ClassifyJavaScriptContext(extension, extension_group, frame_url, - frame->document().securityOrigin()); + frame->document().getSecurityOrigin()); Feature::Context effective_context_type = ClassifyJavaScriptContext( effective_extension, extension_group, ScriptContext::GetEffectiveDocumentURL(frame, frame_url, true), - frame->document().securityOrigin()); + frame->document().getSecurityOrigin()); ScriptContext* context = new ScriptContext(v8_context, frame, extension, context_type, |