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

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

Issue 10825351: Revert 151581 - Eliminate the 'build_ppapi_ipc_proxy_untrusted' build flag for untrusted PPAPI prox… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « build/common.gypi ('k') | chrome/nacl.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/nacl_host/nacl_browser.cc
===================================================================
--- chrome/browser/nacl_host/nacl_browser.cc (revision 151583)
+++ chrome/browser/nacl_host/nacl_browser.cc (working copy)
@@ -4,7 +4,6 @@
#include "chrome/browser/nacl_host/nacl_browser.h"
-#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/path_service.h"
@@ -13,7 +12,6 @@
#include "build/build_config.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
-#include "chrome/common/chrome_switches.h"
#include "content/public/browser/browser_thread.h"
namespace {
@@ -32,14 +30,13 @@
CACHE_MAX
};
-const FilePath::StringType NaClIrtName() {
- FilePath::StringType irt_name;
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableNaClIPCProxy))
- irt_name.append(FILE_PATH_LITERAL("nacl_ipc_irt_"));
- else
- irt_name.append(FILE_PATH_LITERAL("nacl_irt_"));
+// Determine the name of the IRT file based on the architecture.
+#define NACL_IRT_FILE_NAME(arch_string) \
+ (FILE_PATH_LITERAL("nacl_irt_") \
+ FILE_PATH_LITERAL(arch_string) \
+ FILE_PATH_LITERAL(".nexe"))
+const FilePath::StringType NaClIrtName() {
#if defined(ARCH_CPU_X86_FAMILY)
#if defined(ARCH_CPU_X86_64)
bool is64 = true;
@@ -49,21 +46,15 @@
#else
bool is64 = false;
#endif
- if (is64)
- irt_name.append(FILE_PATH_LITERAL("x86_64"));
- else
- irt_name.append(FILE_PATH_LITERAL("x86_32"));
-
+ return is64 ? NACL_IRT_FILE_NAME("x86_64") : NACL_IRT_FILE_NAME("x86_32");
#elif defined(ARCH_CPU_ARMEL)
// TODO(mcgrathr): Eventually we'll need to distinguish arm32 vs thumb2.
// That may need to be based on the actual nexe rather than a static
// choice, which would require substantial refactoring.
- irt_name.append(FILE_PATH_LITERAL("arm"));
+ return NACL_IRT_FILE_NAME("arm");
#else
#error Add support for your architecture to NaCl IRT file selection
#endif
- irt_name.append(FILE_PATH_LITERAL(".nexe"));
- return irt_name;
}
bool CheckEnvVar(const char* name, bool default_value) {
« no previous file with comments | « build/common.gypi ('k') | chrome/nacl.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698