Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: chrome/test/chromedriver/chrome_launcher_impl.cc

Issue 11359217: Move scoped_temp_dir from base to base/files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/chromedriver/chrome_impl.cc ('k') | chrome/test/logging/win/test_log_collector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/chromedriver/chrome_launcher_impl.h" 5 #include "chrome/test/chromedriver/chrome_launcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 13 matching lines...) Expand all
24 scoped_ptr<Chrome>* chrome) { 24 scoped_ptr<Chrome>* chrome) {
25 FilePath program = chrome_exe; 25 FilePath program = chrome_exe;
26 if (program.empty()) { 26 if (program.empty()) {
27 if (!FindChrome(&program)) 27 if (!FindChrome(&program))
28 return Status(kUnknownError, "cannot find Chrome binary"); 28 return Status(kUnknownError, "cannot find Chrome binary");
29 } 29 }
30 30
31 CommandLine command(program); 31 CommandLine command(program);
32 command.AppendSwitch("enable-logging"); 32 command.AppendSwitch("enable-logging");
33 command.AppendSwitchASCII("logging-level", "1"); 33 command.AppendSwitchASCII("logging-level", "1");
34 ScopedTempDir user_data_dir; 34 base::ScopedTempDir user_data_dir;
35 if (!user_data_dir.CreateUniqueTempDir()) 35 if (!user_data_dir.CreateUniqueTempDir())
36 return Status(kUnknownError, "cannot create temp dir for user data dir"); 36 return Status(kUnknownError, "cannot create temp dir for user data dir");
37 command.AppendSwitchPath("user-data-dir", user_data_dir.path()); 37 command.AppendSwitchPath("user-data-dir", user_data_dir.path());
38 command.AppendArg("about:blank"); 38 command.AppendArg("about:blank");
39 39
40 base::LaunchOptions options; 40 base::LaunchOptions options;
41 base::ProcessHandle process; 41 base::ProcessHandle process;
42 if (!base::LaunchProcess(command, options, &process)) 42 if (!base::LaunchProcess(command, options, &process))
43 return Status(kUnknownError, "chrome failed to start"); 43 return Status(kUnknownError, "chrome failed to start");
44 chrome->reset(new ChromeImpl(process, &user_data_dir)); 44 chrome->reset(new ChromeImpl(process, &user_data_dir));
45 45
46 return Status(kOk); 46 return Status(kOk);
47 } 47 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome_impl.cc ('k') | chrome/test/logging/win/test_log_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698