| OLD | NEW |
| 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/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
| 28 #include "chrome/common/chrome_version_info.h" | 28 #include "chrome/common/chrome_version_info.h" |
| 29 #include "chrome/common/crash_keys.h" | 29 #include "chrome/common/crash_keys.h" |
| 30 #include "chrome/common/logging_chrome.h" | 30 #include "chrome/common/logging_chrome.h" |
| 31 #include "chrome/common/profiling.h" | 31 #include "chrome/common/profiling.h" |
| 32 #include "chrome/common/switch_utils.h" | 32 #include "chrome/common/switch_utils.h" |
| 33 #include "chrome/common/url_constants.h" | 33 #include "chrome/common/url_constants.h" |
| 34 #include "chrome/plugin/chrome_content_plugin_client.h" | 34 #include "chrome/plugin/chrome_content_plugin_client.h" |
| 35 #include "chrome/renderer/chrome_content_renderer_client.h" | 35 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 36 #include "chrome/utility/chrome_content_utility_client.h" | 36 #include "chrome/utility/chrome_content_utility_client.h" |
| 37 #include "components/component_updater/common/component_updater_paths.h" |
| 37 #include "components/nacl/common/nacl_switches.h" | 38 #include "components/nacl/common/nacl_switches.h" |
| 38 #include "components/startup_metric_utils/startup_metric_utils.h" | 39 #include "components/startup_metric_utils/startup_metric_utils.h" |
| 39 #include "content/public/common/content_client.h" | 40 #include "content/public/common/content_client.h" |
| 40 #include "content/public/common/content_paths.h" | 41 #include "content/public/common/content_paths.h" |
| 41 #include "ui/base/ui_base_switches.h" | 42 #include "ui/base/ui_base_switches.h" |
| 42 | 43 |
| 43 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 44 #include <atlbase.h> | 45 #include <atlbase.h> |
| 45 #include <malloc.h> | 46 #include <malloc.h> |
| 46 #include <algorithm> | 47 #include <algorithm> |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 } | 418 } |
| 418 #endif | 419 #endif |
| 419 | 420 |
| 420 chrome::RegisterPathProvider(); | 421 chrome::RegisterPathProvider(); |
| 421 #if defined(OS_CHROMEOS) | 422 #if defined(OS_CHROMEOS) |
| 422 chromeos::RegisterPathProvider(); | 423 chromeos::RegisterPathProvider(); |
| 423 #endif | 424 #endif |
| 424 #if !defined(DISABLE_NACL) && defined(OS_LINUX) | 425 #if !defined(DISABLE_NACL) && defined(OS_LINUX) |
| 425 nacl::RegisterPathProvider(); | 426 nacl::RegisterPathProvider(); |
| 426 #endif | 427 #endif |
| 428 base::FilePath user_data; |
| 429 if (PathService::Get(chrome::DIR_USER_DATA, &user_data)) |
| 430 component_updater::RegisterPathProvider(user_data); |
| 427 | 431 |
| 428 // No support for ANDROID yet as DiagnosticsController needs wchar support. | 432 // No support for ANDROID yet as DiagnosticsController needs wchar support. |
| 429 // TODO(gspencer): That's not true anymore, or at least there are no w-string | 433 // TODO(gspencer): That's not true anymore, or at least there are no w-string |
| 430 // references anymore. Not sure if that means this can be enabled on Android or | 434 // references anymore. Not sure if that means this can be enabled on Android or |
| 431 // not though. As there is no easily accessible command line on Android, I'm | 435 // not though. As there is no easily accessible command line on Android, I'm |
| 432 // not sure this is a big deal. | 436 // not sure this is a big deal. |
| 433 #if !defined(OS_ANDROID) && !defined(CHROME_MULTIPLE_DLL_CHILD) | 437 #if !defined(OS_ANDROID) && !defined(CHROME_MULTIPLE_DLL_CHILD) |
| 434 // If we are in diagnostics mode this is the end of the line: after the | 438 // If we are in diagnostics mode this is the end of the line: after the |
| 435 // diagnostics are run the process will invariably exit. | 439 // diagnostics are run the process will invariably exit. |
| 436 if (command_line.HasSwitch(switches::kDiagnostics)) { | 440 if (command_line.HasSwitch(switches::kDiagnostics)) { |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 } | 899 } |
| 896 | 900 |
| 897 content::ContentUtilityClient* | 901 content::ContentUtilityClient* |
| 898 ChromeMainDelegate::CreateContentUtilityClient() { | 902 ChromeMainDelegate::CreateContentUtilityClient() { |
| 899 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 903 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
| 900 return NULL; | 904 return NULL; |
| 901 #else | 905 #else |
| 902 return g_chrome_content_utility_client.Pointer(); | 906 return g_chrome_content_utility_client.Pointer(); |
| 903 #endif | 907 #endif |
| 904 } | 908 } |
| OLD | NEW |