Chromium Code Reviews| Index: chrome/test/base/chrome_test_launcher.cc |
| =================================================================== |
| --- chrome/test/base/chrome_test_launcher.cc (revision 152131) |
| +++ chrome/test/base/chrome_test_launcher.cc (working copy) |
| @@ -10,7 +10,6 @@ |
| #include "base/logging.h" |
| #include "base/memory/linked_ptr.h" |
| #include "base/run_loop.h" |
| -#include "base/scoped_temp_dir.h" |
| #include "base/test/test_file_util.h" |
| #include "chrome/app/chrome_main_delegate.h" |
| #include "chrome/common/chrome_switches.h" |
| @@ -78,7 +77,7 @@ |
| } |
| virtual bool AdjustChildProcessCommandLine( |
| - CommandLine* command_line) OVERRIDE { |
| + CommandLine* command_line, const FilePath& temp_data_dir) OVERRIDE { |
| CommandLine new_command_line(command_line->GetProgram()); |
| CommandLine::SwitchMap switches = command_line->GetSwitches(); |
| @@ -90,21 +89,8 @@ |
| new_command_line.AppendSwitchNative((*iter).first, (*iter).second); |
| } |
| - // Clean up previous temp dir. |
| - // We Take() the directory and delete it ourselves so that the next |
| - // CreateUniqueTempDir will succeed even if deleting the directory fails. |
|
scottmg
2012/08/17 21:00:06
does this need to happen in test_launcher now?
jam
2012/08/17 21:08:05
no, because now it's a scoped ptr around each Adju
|
| - if (!temp_dir_.path().empty() && |
| - !file_util::DieFileDie(temp_dir_.Take(), true)) { |
| - LOG(ERROR) << "Error deleting previous temp profile directory"; |
| - } |
| + new_command_line.AppendSwitchPath(switches::kUserDataDir, temp_data_dir); |
| - // Create a new user data dir and pass it to the child. |
| - if (!temp_dir_.CreateUniqueTempDir() || !temp_dir_.IsValid()) { |
| - LOG(ERROR) << "Error creating temp profile directory"; |
| - return false; |
| - } |
| - new_command_line.AppendSwitchPath(switches::kUserDataDir, temp_dir_.path()); |
| - |
| // file:// access for ChromeOS. |
| new_command_line.AppendSwitch(switches::kAllowFileAccess); |
| @@ -133,8 +119,6 @@ |
| } |
| private: |
| - ScopedTempDir temp_dir_; |
| - |
| #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) |
| std::stack<linked_ptr<views::AcceleratorHandler> > handlers_; |
| #endif |