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/test/base/test_launcher_utils.h" | 5 #include "chrome/test/base/test_launcher_utils.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 13 #include "build/build_config.h" |
13 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
14 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
15 #include "components/os_crypt/os_crypt_switches.h" | 16 #include "components/os_crypt/os_crypt_switches.h" |
16 #include "content/public/common/content_switches.h" | 17 #include "content/public/common/content_switches.h" |
17 | 18 |
18 #if defined(USE_AURA) | 19 #if defined(USE_AURA) |
19 #include "ui/wm/core/wm_core_switches.h" | 20 #include "ui/wm/core/wm_core_switches.h" |
20 #endif | 21 #endif |
21 | 22 |
22 namespace test_launcher_utils { | 23 namespace test_launcher_utils { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // Note: we use an environment variable here, because we have to pass the | 89 // Note: we use an environment variable here, because we have to pass the |
89 // value to the child process. This is the simplest way to do it. | 90 // value to the child process. This is the simplest way to do it. |
90 scoped_ptr<base::Environment> env(base::Environment::Create()); | 91 scoped_ptr<base::Environment> env(base::Environment::Create()); |
91 success = success && env->SetVar("XDG_CACHE_HOME", user_data_dir.value()); | 92 success = success && env->SetVar("XDG_CACHE_HOME", user_data_dir.value()); |
92 #endif | 93 #endif |
93 | 94 |
94 return success; | 95 return success; |
95 } | 96 } |
96 | 97 |
97 } // namespace test_launcher_utils | 98 } // namespace test_launcher_utils |
OLD | NEW |