| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 command_line->GetSwitchValueASCII(switches::kProcessType); | 330 command_line->GetSwitchValueASCII(switches::kProcessType); |
| 331 | 331 |
| 332 #if defined(OS_LINUX) | 332 #if defined(OS_LINUX) |
| 333 // On Linux, Chrome does not support running multiple copies under different | 333 // On Linux, Chrome does not support running multiple copies under different |
| 334 // DISPLAYs, so the profile directory can be specified in the environment to | 334 // DISPLAYs, so the profile directory can be specified in the environment to |
| 335 // support the virtual desktop use-case. | 335 // support the virtual desktop use-case. |
| 336 if (user_data_dir.empty()) { | 336 if (user_data_dir.empty()) { |
| 337 std::string user_data_dir_string; | 337 std::string user_data_dir_string; |
| 338 scoped_ptr<base::Environment> environment(base::Environment::Create()); | 338 scoped_ptr<base::Environment> environment(base::Environment::Create()); |
| 339 if (environment->GetVar("CHROME_USER_DATA_DIR", &user_data_dir_string) && | 339 if (environment->GetVar("CHROME_USER_DATA_DIR", &user_data_dir_string) && |
| 340 base::IsStringUTF8(user_data_dir_string)) { | 340 IsStringUTF8(user_data_dir_string)) { |
| 341 user_data_dir = base::FilePath::FromUTF8Unsafe(user_data_dir_string); | 341 user_data_dir = base::FilePath::FromUTF8Unsafe(user_data_dir_string); |
| 342 } | 342 } |
| 343 } | 343 } |
| 344 #endif | 344 #endif |
| 345 #if defined(OS_MACOSX) || defined(OS_WIN) | 345 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 346 policy::path_parser::CheckUserDataDirPolicy(&user_data_dir); | 346 policy::path_parser::CheckUserDataDirPolicy(&user_data_dir); |
| 347 #endif | 347 #endif |
| 348 | 348 |
| 349 const bool specified_directory_was_invalid = !user_data_dir.empty() && | 349 const bool specified_directory_was_invalid = !user_data_dir.empty() && |
| 350 !PathService::OverrideAndCreateIfNeeded(chrome::DIR_USER_DATA, | 350 !PathService::OverrideAndCreateIfNeeded(chrome::DIR_USER_DATA, |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 } | 901 } |
| 902 | 902 |
| 903 content::ContentUtilityClient* | 903 content::ContentUtilityClient* |
| 904 ChromeMainDelegate::CreateContentUtilityClient() { | 904 ChromeMainDelegate::CreateContentUtilityClient() { |
| 905 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 905 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
| 906 return NULL; | 906 return NULL; |
| 907 #else | 907 #else |
| 908 return g_chrome_content_utility_client.Pointer(); | 908 return g_chrome_content_utility_client.Pointer(); |
| 909 #endif | 909 #endif |
| 910 } | 910 } |
| OLD | NEW |