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

Unified Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 8591035: Clean up disable_nacl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « no previous file | chrome/browser/renderer_host/chrome_render_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/nacl_host/nacl_process_host.cc
diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc
index a119ec37bf24276cf5497883d5f1c251526a9c25..72ef2e8e34f42f7f9bb296059f5ad9aa456e4c90 100644
--- a/chrome/browser/nacl_host/nacl_process_host.cc
+++ b/chrome/browser/nacl_host/nacl_process_host.cc
@@ -36,7 +36,6 @@ using content::BrowserThread;
namespace {
-#if !defined(DISABLE_NACL)
void SetCloseOnExec(nacl::Handle fd) {
#if defined(OS_POSIX)
int flags = fcntl(fd, F_GETFD);
@@ -45,7 +44,6 @@ void SetCloseOnExec(nacl::Handle fd) {
CHECK_EQ(rc, 0);
#endif
}
-#endif
// Represents shared state for all NaClProcessHost objects in the browser.
// Currently this just handles holding onto the file descriptor for the IRT.
@@ -118,10 +116,6 @@ NaClProcessHost::NaClProcessHost(const std::wstring& url)
}
NaClProcessHost::~NaClProcessHost() {
- // nacl::Close() is not available at link time if DISABLE_NACL is
- // defined, but we still compile a bunch of other code from this
- // file anyway. TODO(mseaborn): Make this less messy.
-#ifndef DISABLE_NACL
for (size_t i = 0; i < internal_->sockets_for_renderer.size(); i++) {
if (nacl::Close(internal_->sockets_for_renderer[i]) != 0) {
LOG(ERROR) << "nacl::Close() failed";
@@ -132,7 +126,6 @@ NaClProcessHost::~NaClProcessHost() {
LOG(ERROR) << "nacl::Close() failed";
}
}
-#endif
if (reply_msg_) {
// The process failed to launch for some reason.
@@ -174,10 +167,6 @@ bool NaClProcessHost::Launch(
ChromeRenderMessageFilter* chrome_render_message_filter,
int socket_count,
IPC::Message* reply_msg) {
-#ifdef DISABLE_NACL
- NOTIMPLEMENTED() << "Native Client disabled at build time";
- return false;
-#else
// Place an arbitrary limit on the number of sockets to limit
// exposure in case the renderer is compromised. We can increase
// this if necessary.
@@ -220,7 +209,6 @@ bool NaClProcessHost::Launch(
reply_msg_ = reply_msg;
return true;
-#endif // DISABLE_NACL
}
bool NaClProcessHost::LaunchSelLdr() {
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698