| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 | 384 |
| 385 // Append the fallback user data directory to the commandline. Otherwise, | 385 // Append the fallback user data directory to the commandline. Otherwise, |
| 386 // child or service processes will attempt to use the invalid directory. | 386 // child or service processes will attempt to use the invalid directory. |
| 387 if (specified_directory_was_invalid) | 387 if (specified_directory_was_invalid) |
| 388 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); | 388 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace | 391 } // namespace |
| 392 | 392 |
| 393 ChromeMainDelegate::ChromeMainDelegate() { | 393 ChromeMainDelegate::ChromeMainDelegate() { |
| 394 #if defined(OS_ANDROID) | 394 // TODO(mfomitchev): Temporary record main entry point time here for Aura |
| 395 // while the Java code is broken. |
| 396 #if defined(OS_ANDROID) && !defined(USE_AURA) |
| 395 // On Android the main entry point time is the time when the Java code starts. | 397 // On Android the main entry point time is the time when the Java code starts. |
| 396 // This happens before the shared library containing this code is even loaded. | 398 // This happens before the shared library containing this code is even loaded. |
| 397 // The Java startup code has recorded that time, but the C++ code can't fetch it | 399 // The Java startup code has recorded that time, but the C++ code can't fetch it |
| 398 // from the Java side until it has initialized the JNI. See | 400 // from the Java side until it has initialized the JNI. See |
| 399 // ChromeMainDelegateAndroid. | 401 // ChromeMainDelegateAndroid. |
| 400 #else | 402 #else |
| 401 startup_metric_utils::RecordMainEntryPointTime(); | 403 startup_metric_utils::RecordMainEntryPointTime(); |
| 402 #endif | 404 #endif |
| 403 } | 405 } |
| 404 | 406 |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 SuppressWindowsErrorDialogs(); | 814 SuppressWindowsErrorDialogs(); |
| 813 #endif | 815 #endif |
| 814 | 816 |
| 815 #if defined(CHROME_MULTIPLE_DLL_CHILD) || !defined(CHROME_MULTIPLE_DLL_BROWSER) | 817 #if defined(CHROME_MULTIPLE_DLL_CHILD) || !defined(CHROME_MULTIPLE_DLL_BROWSER) |
| 816 #if !defined(DISABLE_NACL) | 818 #if !defined(DISABLE_NACL) |
| 817 ChromeContentClient::SetNaClEntryFunctions( | 819 ChromeContentClient::SetNaClEntryFunctions( |
| 818 nacl_plugin::PPP_GetInterface, | 820 nacl_plugin::PPP_GetInterface, |
| 819 nacl_plugin::PPP_InitializeModule, | 821 nacl_plugin::PPP_InitializeModule, |
| 820 nacl_plugin::PPP_ShutdownModule); | 822 nacl_plugin::PPP_ShutdownModule); |
| 821 #endif | 823 #endif |
| 822 #if defined(ENABLE_PLUGINS) | 824 #if defined(ENABLE_PLUGINS) && !defined(OS_ANDROID) |
| 823 ChromeContentClient::SetPDFEntryFunctions( | 825 ChromeContentClient::SetPDFEntryFunctions( |
| 824 chrome_pdf::PPP_GetInterface, | 826 chrome_pdf::PPP_GetInterface, |
| 825 chrome_pdf::PPP_InitializeModule, | 827 chrome_pdf::PPP_InitializeModule, |
| 826 chrome_pdf::PPP_ShutdownModule); | 828 chrome_pdf::PPP_ShutdownModule); |
| 827 #endif | 829 #endif |
| 828 #endif | 830 #endif |
| 829 } | 831 } |
| 830 | 832 |
| 831 int ChromeMainDelegate::RunProcess( | 833 int ChromeMainDelegate::RunProcess( |
| 832 const std::string& process_type, | 834 const std::string& process_type, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 case version_info::Channel::CANARY: | 976 case version_info::Channel::CANARY: |
| 975 return true; | 977 return true; |
| 976 case version_info::Channel::DEV: | 978 case version_info::Channel::DEV: |
| 977 case version_info::Channel::BETA: | 979 case version_info::Channel::BETA: |
| 978 case version_info::Channel::STABLE: | 980 case version_info::Channel::STABLE: |
| 979 default: | 981 default: |
| 980 // Don't enable instrumentation. | 982 // Don't enable instrumentation. |
| 981 return false; | 983 return false; |
| 982 } | 984 } |
| 983 } | 985 } |
| OLD | NEW |