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

Side by Side 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: Windows build fix 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/app/chrome_main_delegate.h" 5 #include "chrome/app/chrome_main_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/stats_counters.h" 10 #include "base/metrics/stats_counters.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/common/chrome_paths_internal.h" 23 #include "chrome/common/chrome_paths_internal.h"
24 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/common/chrome_version_info.h" 25 #include "chrome/common/chrome_version_info.h"
26 #include "chrome/common/logging_chrome.h" 26 #include "chrome/common/logging_chrome.h"
27 #include "chrome/common/profiling.h" 27 #include "chrome/common/profiling.h"
28 #include "chrome/common/startup_metric_utils.h" 28 #include "chrome/common/startup_metric_utils.h"
29 #include "chrome/common/url_constants.h" 29 #include "chrome/common/url_constants.h"
30 #include "chrome/plugin/chrome_content_plugin_client.h" 30 #include "chrome/plugin/chrome_content_plugin_client.h"
31 #include "chrome/renderer/chrome_content_renderer_client.h" 31 #include "chrome/renderer/chrome_content_renderer_client.h"
32 #include "chrome/utility/chrome_content_utility_client.h" 32 #include "chrome/utility/chrome_content_utility_client.h"
33 #include "components/nacl/common/nacl_switches.h"
33 #include "content/public/common/content_client.h" 34 #include "content/public/common/content_client.h"
34 #include "content/public/common/content_paths.h" 35 #include "content/public/common/content_paths.h"
35 #include "ui/base/ui_base_switches.h" 36 #include "ui/base/ui_base_switches.h"
36 37
37 #if defined(OS_WIN) 38 #if defined(OS_WIN)
38 #include <algorithm> 39 #include <algorithm>
39 #include <atlbase.h> 40 #include <atlbase.h>
40 #include <malloc.h> 41 #include <malloc.h>
41 #include "base/strings/string_util.h" 42 #include "base/strings/string_util.h"
42 #include "sandbox/win/src/sandbox.h" 43 #include "sandbox/win/src/sandbox.h"
(...skipping 12 matching lines...) Expand all
55 #include "chrome/common/mac/objc_zombie.h" 56 #include "chrome/common/mac/objc_zombie.h"
56 #include "grit/chromium_strings.h" 57 #include "grit/chromium_strings.h"
57 #include "ui/base/l10n/l10n_util_mac.h" 58 #include "ui/base/l10n/l10n_util_mac.h"
58 #endif 59 #endif
59 60
60 #if defined(OS_POSIX) 61 #if defined(OS_POSIX)
61 #include <locale.h> 62 #include <locale.h>
62 #include <signal.h> 63 #include <signal.h>
63 #endif 64 #endif
64 65
66 #ifndef (DISABLE_NACL)
jam 2013/06/17 20:10:43 nit: here and below, "#if !defined(DISABLE_NACL)".
65 #if defined(OS_POSIX) && !defined(OS_MACOSX) 67 #if defined(OS_POSIX) && !defined(OS_MACOSX)
66 #include "chrome/app/nacl_fork_delegate_linux.h" 68 #include "components/nacl/common/nacl_fork_delegate_linux.h"
69 #include "components/nacl/common/nacl_paths.h"
67 #endif 70 #endif
71 #endif // ifndef DISABLE_NACL
68 72
69 #if defined(OS_CHROMEOS) 73 #if defined(OS_CHROMEOS)
70 #include "base/sys_info.h" 74 #include "base/sys_info.h"
71 #include "chrome/browser/chromeos/boot_times_loader.h" 75 #include "chrome/browser/chromeos/boot_times_loader.h"
72 #include "chromeos/chromeos_paths.h" 76 #include "chromeos/chromeos_paths.h"
73 #endif 77 #endif
74 78
75 #if defined(OS_ANDROID) 79 #if defined(OS_ANDROID)
76 #include "chrome/common/descriptors_android.h" 80 #include "chrome/common/descriptors_android.h"
77 #endif 81 #endif
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 471
468 void ChromeMainDelegate::PreSandboxStartup() { 472 void ChromeMainDelegate::PreSandboxStartup() {
469 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 473 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
470 std::string process_type = 474 std::string process_type =
471 command_line.GetSwitchValueASCII(switches::kProcessType); 475 command_line.GetSwitchValueASCII(switches::kProcessType);
472 476
473 chrome::RegisterPathProvider(); 477 chrome::RegisterPathProvider();
474 #if defined(OS_CHROMEOS) 478 #if defined(OS_CHROMEOS)
475 chromeos::RegisterPathProvider(); 479 chromeos::RegisterPathProvider();
476 #endif 480 #endif
481 #ifndef (DISABLE_NACL)
482 #if defined(OS_POSIX) && !defined(OS_MACOSX)
483 nacl::RegisterPathProvider();
484 #endif
485 #endif // ifndef (DISABLE_NACL)
477 486
478 #if defined(OS_MACOSX) 487 #if defined(OS_MACOSX)
479 // On the Mac, the child executable lives at a predefined location within 488 // On the Mac, the child executable lives at a predefined location within
480 // the app bundle's versioned directory. 489 // the app bundle's versioned directory.
481 PathService::Override(content::CHILD_PROCESS_EXE, 490 PathService::Override(content::CHILD_PROCESS_EXE,
482 chrome::GetVersionedDirectory(). 491 chrome::GetVersionedDirectory().
483 Append(chrome::kHelperProcessExecutablePath)); 492 Append(chrome::kHelperProcessExecutablePath));
484 493
485 InitMacCrashReporter(command_line, process_type); 494 InitMacCrashReporter(command_line, process_type);
486 #endif 495 #endif
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 ui::SetResourcesDataDLL(_AtlBaseModule.GetResourceInstance()); 533 ui::SetResourcesDataDLL(_AtlBaseModule.GetResourceInstance());
525 #endif 534 #endif
526 535
527 if (SubprocessNeedsResourceBundle(process_type)) { 536 if (SubprocessNeedsResourceBundle(process_type)) {
528 // Initialize ResourceBundle which handles files loaded from external 537 // Initialize ResourceBundle which handles files loaded from external
529 // sources. The language should have been passed in to us from the 538 // sources. The language should have been passed in to us from the
530 // browser process as a command line flag. 539 // browser process as a command line flag.
531 DCHECK(command_line.HasSwitch(switches::kLang) || 540 DCHECK(command_line.HasSwitch(switches::kLang) ||
532 process_type == switches::kZygoteProcess || 541 process_type == switches::kZygoteProcess ||
533 process_type == switches::kGpuProcess || 542 process_type == switches::kGpuProcess ||
543 #ifndef (DISABLE_NACL)
534 process_type == switches::kNaClLoaderProcess || 544 process_type == switches::kNaClLoaderProcess ||
545 #endif
535 process_type == switches::kPpapiBrokerProcess || 546 process_type == switches::kPpapiBrokerProcess ||
536 process_type == switches::kPpapiPluginProcess); 547 process_type == switches::kPpapiPluginProcess);
537 548
538 // TODO(markusheintz): The command line flag --lang is actually processed 549 // TODO(markusheintz): The command line flag --lang is actually processed
539 // by the CommandLinePrefStore, and made available through the PrefService 550 // by the CommandLinePrefStore, and made available through the PrefService
540 // via the preference prefs::kApplicationLocale. The browser process uses 551 // via the preference prefs::kApplicationLocale. The browser process uses
541 // the --lang flag to pass the value of the PrefService in here. Maybe 552 // the --lang flag to pass the value of the PrefService in here. Maybe
542 // this value could be passed in a different way. 553 // this value could be passed in a different way.
543 const std::string locale = 554 const std::string locale =
544 command_line.GetSwitchValueASCII(switches::kLang); 555 command_line.GetSwitchValueASCII(switches::kLang);
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 724
714 content::ContentRendererClient* 725 content::ContentRendererClient*
715 ChromeMainDelegate::CreateContentRendererClient() { 726 ChromeMainDelegate::CreateContentRendererClient() {
716 return &g_chrome_content_renderer_client.Get(); 727 return &g_chrome_content_renderer_client.Get();
717 } 728 }
718 729
719 content::ContentUtilityClient* 730 content::ContentUtilityClient*
720 ChromeMainDelegate::CreateContentUtilityClient() { 731 ChromeMainDelegate::CreateContentUtilityClient() {
721 return &g_chrome_content_utility_client.Get(); 732 return &g_chrome_content_utility_client.Get();
722 } 733 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698