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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 command_line->GetSwitchValuePath(switches::kUserDataDir); | 357 command_line->GetSwitchValuePath(switches::kUserDataDir); |
358 std::string process_type = | 358 std::string process_type = |
359 command_line->GetSwitchValueASCII(switches::kProcessType); | 359 command_line->GetSwitchValueASCII(switches::kProcessType); |
360 | 360 |
361 #if defined(OS_LINUX) | 361 #if defined(OS_LINUX) |
362 // On Linux, Chrome does not support running multiple copies under different | 362 // On Linux, Chrome does not support running multiple copies under different |
363 // DISPLAYs, so the profile directory can be specified in the environment to | 363 // DISPLAYs, so the profile directory can be specified in the environment to |
364 // support the virtual desktop use-case. | 364 // support the virtual desktop use-case. |
365 if (user_data_dir.empty()) { | 365 if (user_data_dir.empty()) { |
366 std::string user_data_dir_string; | 366 std::string user_data_dir_string; |
367 scoped_ptr<base::Environment> environment(base::Environment::Create()); | 367 std::unique_ptr<base::Environment> environment(base::Environment::Create()); |
368 if (environment->GetVar("CHROME_USER_DATA_DIR", &user_data_dir_string) && | 368 if (environment->GetVar("CHROME_USER_DATA_DIR", &user_data_dir_string) && |
369 base::IsStringUTF8(user_data_dir_string)) { | 369 base::IsStringUTF8(user_data_dir_string)) { |
370 user_data_dir = base::FilePath::FromUTF8Unsafe(user_data_dir_string); | 370 user_data_dir = base::FilePath::FromUTF8Unsafe(user_data_dir_string); |
371 } | 371 } |
372 } | 372 } |
373 #endif | 373 #endif |
374 #if defined(OS_MACOSX) || defined(OS_WIN) | 374 #if defined(OS_MACOSX) || defined(OS_WIN) |
375 policy::path_parser::CheckUserDataDirPolicy(&user_data_dir); | 375 policy::path_parser::CheckUserDataDirPolicy(&user_data_dir); |
376 #endif | 376 #endif |
377 | 377 |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 case version_info::Channel::CANARY: | 1012 case version_info::Channel::CANARY: |
1013 return true; | 1013 return true; |
1014 case version_info::Channel::DEV: | 1014 case version_info::Channel::DEV: |
1015 case version_info::Channel::BETA: | 1015 case version_info::Channel::BETA: |
1016 case version_info::Channel::STABLE: | 1016 case version_info::Channel::STABLE: |
1017 default: | 1017 default: |
1018 // Don't enable instrumentation. | 1018 // Don't enable instrumentation. |
1019 return false; | 1019 return false; |
1020 } | 1020 } |
1021 } | 1021 } |
OLD | NEW |