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

Unified Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 10449094: Fix client-side phishing detection test flakiness and ChromeOS failure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore the previous sandbox-enabled state Created 8 years, 6 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
Index: content/renderer/renderer_webkitplatformsupport_impl.cc
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index d2f0161d888c71c0999e15a26394a0e2a5b96ba0..32a708655c01c73b0daf9f4ae3a617b0d896f12e 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -101,6 +101,8 @@ using WebKit::WebString;
using WebKit::WebURL;
using WebKit::WebVector;
+static bool g_sandbox_enabled = true;
+
//------------------------------------------------------------------------------
class RendererWebKitPlatformSupportImpl::MimeRegistry
@@ -164,9 +166,14 @@ RendererWebKitPlatformSupportImpl::RendererWebKitPlatformSupportImpl()
: clipboard_client_(new RendererClipboardClient),
clipboard_(new webkit_glue::WebClipboardImpl(clipboard_client_.get())),
mime_registry_(new RendererWebKitPlatformSupportImpl::MimeRegistry),
- sandbox_support_(new RendererWebKitPlatformSupportImpl::SandboxSupport),
sudden_termination_disables_(0),
shared_worker_repository_(new WebSharedWorkerRepositoryImpl) {
+ if (g_sandbox_enabled) {
+ sandbox_support_.reset(
+ new RendererWebKitPlatformSupportImpl::SandboxSupport);
+ } else {
+ DVLOG(1) << "Disabling sandbox support for testing.";
+ }
}
RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl() {
@@ -718,6 +725,14 @@ RendererWebKitPlatformSupportImpl::createMediaStreamCenter(
return render_thread->CreateMediaStreamCenter(client);
}
+// static
+bool RendererWebKitPlatformSupportImpl::SetSandboxEnabledForTesting(
+ bool enable) {
+ bool was_enabled = g_sandbox_enabled;
+ g_sandbox_enabled = enable;
+ return was_enabled;
+}
+
GpuChannelHostFactory*
RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() {
return RenderThreadImpl::current();
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | content/test/render_view_fake_resources_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698