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