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 IsStringUTF8(user_data_dir_string)) { | 340 base::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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 } | 885 } |
886 | 886 |
887 content::ContentUtilityClient* | 887 content::ContentUtilityClient* |
888 ChromeMainDelegate::CreateContentUtilityClient() { | 888 ChromeMainDelegate::CreateContentUtilityClient() { |
889 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 889 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
890 return NULL; | 890 return NULL; |
891 #else | 891 #else |
892 return g_chrome_content_utility_client.Pointer(); | 892 return g_chrome_content_utility_client.Pointer(); |
893 #endif | 893 #endif |
894 } | 894 } |
OLD | NEW |