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

Side by Side Diff: chrome/app/chrome_main_delegate.cc

Issue 16867015: Revert r207951 - "Separate NaCl switches to their own file." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/breakpad_mac.mm ('k') | chrome/app/nacl_fork_delegate_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
34 #include "content/public/common/content_client.h" 33 #include "content/public/common/content_client.h"
35 #include "content/public/common/content_paths.h" 34 #include "content/public/common/content_paths.h"
36 #include "ui/base/ui_base_switches.h" 35 #include "ui/base/ui_base_switches.h"
37 36
38 #if defined(OS_WIN) 37 #if defined(OS_WIN)
39 #include <algorithm> 38 #include <algorithm>
40 #include <atlbase.h> 39 #include <atlbase.h>
41 #include <malloc.h> 40 #include <malloc.h>
42 #include "base/strings/string_util.h" 41 #include "base/strings/string_util.h"
43 #include "sandbox/win/src/sandbox.h" 42 #include "sandbox/win/src/sandbox.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 521
523 #if defined(OS_WIN) 522 #if defined(OS_WIN)
524 // TODO(darin): Kill this once http://crbug.com/52609 is fixed. 523 // TODO(darin): Kill this once http://crbug.com/52609 is fixed.
525 ui::SetResourcesDataDLL(_AtlBaseModule.GetResourceInstance()); 524 ui::SetResourcesDataDLL(_AtlBaseModule.GetResourceInstance());
526 #endif 525 #endif
527 526
528 if (SubprocessNeedsResourceBundle(process_type)) { 527 if (SubprocessNeedsResourceBundle(process_type)) {
529 // Initialize ResourceBundle which handles files loaded from external 528 // Initialize ResourceBundle which handles files loaded from external
530 // sources. The language should have been passed in to us from the 529 // sources. The language should have been passed in to us from the
531 // browser process as a command line flag. 530 // browser process as a command line flag.
532 #if defined(DISABLE_NACL)
533 DCHECK(command_line.HasSwitch(switches::kLang) ||
534 process_type == switches::kZygoteProcess ||
535 process_type == switches::kGpuProcess ||
536 process_type == switches::kPpapiBrokerProcess ||
537 process_type == switches::kPpapiPluginProcess);
538 #else
539 DCHECK(command_line.HasSwitch(switches::kLang) || 531 DCHECK(command_line.HasSwitch(switches::kLang) ||
540 process_type == switches::kZygoteProcess || 532 process_type == switches::kZygoteProcess ||
541 process_type == switches::kGpuProcess || 533 process_type == switches::kGpuProcess ||
542 process_type == switches::kNaClLoaderProcess || 534 process_type == switches::kNaClLoaderProcess ||
543 process_type == switches::kPpapiBrokerProcess || 535 process_type == switches::kPpapiBrokerProcess ||
544 process_type == switches::kPpapiPluginProcess); 536 process_type == switches::kPpapiPluginProcess);
545 #endif
546 537
547 // TODO(markusheintz): The command line flag --lang is actually processed 538 // TODO(markusheintz): The command line flag --lang is actually processed
548 // by the CommandLinePrefStore, and made available through the PrefService 539 // by the CommandLinePrefStore, and made available through the PrefService
549 // via the preference prefs::kApplicationLocale. The browser process uses 540 // via the preference prefs::kApplicationLocale. The browser process uses
550 // the --lang flag to pass the value of the PrefService in here. Maybe 541 // the --lang flag to pass the value of the PrefService in here. Maybe
551 // this value could be passed in a different way. 542 // this value could be passed in a different way.
552 const std::string locale = 543 const std::string locale =
553 command_line.GetSwitchValueASCII(switches::kLang); 544 command_line.GetSwitchValueASCII(switches::kLang);
554 #if defined(OS_ANDROID) 545 #if defined(OS_ANDROID)
555 // The renderer sandbox prevents us from accessing our .pak files directly. 546 // The renderer sandbox prevents us from accessing our .pak files directly.
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 713
723 content::ContentRendererClient* 714 content::ContentRendererClient*
724 ChromeMainDelegate::CreateContentRendererClient() { 715 ChromeMainDelegate::CreateContentRendererClient() {
725 return &g_chrome_content_renderer_client.Get(); 716 return &g_chrome_content_renderer_client.Get();
726 } 717 }
727 718
728 content::ContentUtilityClient* 719 content::ContentUtilityClient*
729 ChromeMainDelegate::CreateContentUtilityClient() { 720 ChromeMainDelegate::CreateContentUtilityClient() {
730 return &g_chrome_content_utility_client.Get(); 721 return &g_chrome_content_utility_client.Get();
731 } 722 }
OLDNEW
« no previous file with comments | « chrome/app/breakpad_mac.mm ('k') | chrome/app/nacl_fork_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698