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

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 16881004: Move chrome/nacl to components/nacl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 7 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
« no previous file with comments | « chrome/app/breakpad_mac.mm ('k') | chrome/app/nacl_fork_delegate_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index 06f8c17934d0d014f905fa368caa56dde298f76e..05f81360141fb77676ed447e19c77565af868cec 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -30,6 +30,7 @@
#include "chrome/plugin/chrome_content_plugin_client.h"
#include "chrome/renderer/chrome_content_renderer_client.h"
#include "chrome/utility/chrome_content_utility_client.h"
+#include "components/nacl/common/nacl_switches.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_paths.h"
#include "ui/base/ui_base_switches.h"
@@ -62,9 +63,12 @@
#include <signal.h>
#endif
+#if !defined(DISABLE_NACL)
#if defined(OS_POSIX) && !defined(OS_MACOSX)
-#include "chrome/app/nacl_fork_delegate_linux.h"
+#include "components/nacl/common/nacl_fork_delegate_linux.h"
+#include "components/nacl/common/nacl_paths.h"
#endif
+#endif // !defined(DISABLE_NACL)
#if defined(OS_CHROMEOS)
#include "base/sys_info.h"
@@ -167,7 +171,7 @@ static void AdjustLinuxOOMScore(const std::string& process_type) {
process_type == switches::kGpuProcess ||
process_type == switches::kServiceProcess) {
score = kMiscScore;
-#ifndef DISABLE_NACL
+#if !defined(DISABLE_NACL)
} else if (process_type == switches::kNaClLoaderProcess) {
score = kPluginScore;
#endif
@@ -474,6 +478,11 @@ void ChromeMainDelegate::PreSandboxStartup() {
#if defined(OS_CHROMEOS)
chromeos::RegisterPathProvider();
#endif
+#if !defined(DISABLE_NACL)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
+ nacl::RegisterPathProvider();
+#endif
+#endif // !defined(DISABLE_NACL)
#if defined(OS_MACOSX)
// On the Mac, the child executable lives at a predefined location within
@@ -528,12 +537,20 @@ void ChromeMainDelegate::PreSandboxStartup() {
// Initialize ResourceBundle which handles files loaded from external
// sources. The language should have been passed in to us from the
// browser process as a command line flag.
- DCHECK(command_line.HasSwitch(switches::kLang) ||
+#if defined(DISABLE_NACL)
+ DCHECK(command_line.HasSwitch(switches::kLang) ||
+ process_type == switches::kZygoteProcess ||
+ process_type == switches::kGpuProcess ||
cpu_(ooo_6.6-7.5) 2013/06/20 03:09:44 indenting seems off
+ process_type == switches::kPpapiBrokerProcess ||
+ process_type == switches::kPpapiPluginProcess);
+#else
+ DCHECK(command_line.HasSwitch(switches::kLang) ||
process_type == switches::kZygoteProcess ||
process_type == switches::kGpuProcess ||
process_type == switches::kNaClLoaderProcess ||
process_type == switches::kPpapiBrokerProcess ||
process_type == switches::kPpapiPluginProcess);
+#endif
// TODO(markusheintz): The command line flag --lang is actually processed
// by the CommandLinePrefStore, and made available through the PrefService
« no previous file with comments | « chrome/app/breakpad_mac.mm ('k') | chrome/app/nacl_fork_delegate_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698