diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 03:29:28 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 03:29:28 +0000 |
commit | e000c4e2867b398739908e915266ac204a09dca1 (patch) | |
tree | 63e2e460ea95d6548315dfdda5c0b2a05083e96e /chrome/renderer/render_view.cc | |
parent | 5cac27f202d39511fcab5176f6bb527a5c5a8653 (diff) | |
download | chromium_src-e000c4e2867b398739908e915266ac204a09dca1.zip chromium_src-e000c4e2867b398739908e915266ac204a09dca1.tar.gz chromium_src-e000c4e2867b398739908e915266ac204a09dca1.tar.bz2 |
Remove extraneous uses of the --enable-user-script
switch. It's better to check this at one chokepoint
(initialization) and let the rest of the code work
the same, but end up as no-ops.
Review URL: http://codereview.chromium.org/18401
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r-- | chrome/renderer/render_view.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 1544198..0eb16ee 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -172,7 +172,6 @@ RenderView::RenderView(RenderThreadBase* render_thread) disable_popup_blocking_(false), has_unload_listener_(false), decrement_shared_popup_at_destruction_(false), - user_scripts_enabled_(false), waiting_for_create_window_ack_(false), form_field_autofill_request_id_(0), popup_notification_visible_(false), @@ -317,8 +316,6 @@ void RenderView::Init(gfx::NativeViewId parent_hwnd, command_line.HasSwitch(switches::kDomAutomationController); disable_popup_blocking_ = command_line.HasSwitch(switches::kDisablePopupBlocking); - user_scripts_enabled_ = - command_line.HasSwitch(switches::kEnableUserScripts); debug_message_handler_ = new DebugMessageHandler(this); render_thread_->AddFilter(debug_message_handler_); @@ -1491,14 +1488,12 @@ void RenderView::DidFinishDocumentLoadForFrame(WebView* webview, // Inject any user scripts. Do not inject into chrome UI pages, but do inject // into any other document. - if (user_scripts_enabled_) { - const GURL &gurl = frame->GetURL(); - if (g_render_thread && // Will be NULL when testing. - (gurl.SchemeIs("file") || - gurl.SchemeIs("http") || - gurl.SchemeIs("https"))) { - g_render_thread->user_script_slave()->InjectScripts(frame); - } + const GURL &gurl = frame->GetURL(); + if (g_render_thread && // Will be NULL when testing. + (gurl.SchemeIs("file") || + gurl.SchemeIs("http") || + gurl.SchemeIs("https"))) { + g_render_thread->user_script_slave()->InjectScripts(frame); } } |