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

Side by Side Diff: net/tools/crash_cache/crash_cache.cc

Issue 7351003: Clean up users of a deprecated base::LaunchApp API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win-only Created 9 years, 5 months 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 | « net/disk_cache/stress_cache.cc ('k') | net/tools/dump_cache/dump_cache.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) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 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 // This command-line program generates the set of files needed for the crash- 5 // This command-line program generates the set of files needed for the crash-
6 // cache unit tests (DiskCacheTest,CacheBackend_Recover*). This program only 6 // cache unit tests (DiskCacheTest,CacheBackend_Recover*). This program only
7 // works properly on debug mode, because the crash functionality is not compiled 7 // works properly on debug mode, because the crash functionality is not compiled
8 // on release builds of the cache. 8 // on release builds of the cache.
9 9
10 #include <string> 10 #include <string>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // Starts a new process, to generate the files. 43 // Starts a new process, to generate the files.
44 int RunSlave(RankCrashes action) { 44 int RunSlave(RankCrashes action) {
45 FilePath exe; 45 FilePath exe;
46 PathService::Get(base::FILE_EXE, &exe); 46 PathService::Get(base::FILE_EXE, &exe);
47 47
48 CommandLine cmdline(exe); 48 CommandLine cmdline(exe);
49 cmdline.AppendArg(base::IntToString(action)); 49 cmdline.AppendArg(base::IntToString(action));
50 50
51 base::ProcessHandle handle; 51 base::ProcessHandle handle;
52 if (!base::LaunchApp(cmdline, false, false, &handle)) { 52 base::LaunchOptions options;
53 options.process_handle = &handle;
54 if (!base::LaunchProcess(cmdline, options)) {
53 printf("Unable to run test %d\n", action); 55 printf("Unable to run test %d\n", action);
54 return GENERIC; 56 return GENERIC;
55 } 57 }
56 58
57 int exit_code; 59 int exit_code;
58 60
59 if (!base::WaitForExitCode(handle, &exit_code)) { 61 if (!base::WaitForExitCode(handle, &exit_code)) {
60 printf("Unable to get return code, test %d\n", action); 62 printf("Unable to get return code, test %d\n", action);
61 return GENERIC; 63 return GENERIC;
62 } 64 }
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 366
365 FilePath path; 367 FilePath path;
366 PathService::Get(base::DIR_SOURCE_ROOT, &path); 368 PathService::Get(base::DIR_SOURCE_ROOT, &path);
367 path = path.AppendASCII("net"); 369 path = path.AppendASCII("net");
368 path = path.AppendASCII("data"); 370 path = path.AppendASCII("data");
369 path = path.AppendASCII("cache_tests"); 371 path = path.AppendASCII("cache_tests");
370 path = path.AppendASCII("new_crashes"); 372 path = path.AppendASCII("new_crashes");
371 373
372 return SlaveCode(path, action); 374 return SlaveCode(path, action);
373 } 375 }
OLDNEW
« no previous file with comments | « net/disk_cache/stress_cache.cc ('k') | net/tools/dump_cache/dump_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698