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

Side by Side Diff: net/disk_cache/stress_cache.cc

Issue 19614003: Use a direct include of the message_loop header in net/, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/sparse_control.cc ('k') | net/disk_cache/v3/backend_impl_v3.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 // This is a simple application that stress-tests the crash recovery of the disk 5 // This is a simple application that stress-tests the crash recovery of the disk
6 // cache. The main application starts a copy of itself on a loop, checking the 6 // cache. The main application starts a copy of itself on a loop, checking the
7 // exit code of the child process. When the child dies in an unexpected way, 7 // exit code of the child process. When the child dies in an unexpected way,
8 // the main application quits. 8 // the main application quits.
9 9
10 // The child application has two threads: one to exercise the cache in an 10 // The child application has two threads: one to exercise the cache in an
11 // infinite loop, and another one to asynchronously kill the process. 11 // infinite loop, and another one to asynchronously kill the process.
12 12
13 // A regular build should never crash. 13 // A regular build should never crash.
14 // To test that the disk cache doesn't generate critical errors with regular 14 // To test that the disk cache doesn't generate critical errors with regular
15 // application level crashes, edit stress_support.h. 15 // application level crashes, edit stress_support.h.
16 16
17 #include <string> 17 #include <string>
18 #include <vector> 18 #include <vector>
19 19
20 #include "base/at_exit.h" 20 #include "base/at_exit.h"
21 #include "base/bind.h" 21 #include "base/bind.h"
22 #include "base/command_line.h" 22 #include "base/command_line.h"
23 #include "base/debug/debugger.h" 23 #include "base/debug/debugger.h"
24 #include "base/files/file_path.h" 24 #include "base/files/file_path.h"
25 #include "base/logging.h" 25 #include "base/logging.h"
26 #include "base/message_loop.h" 26 #include "base/message_loop/message_loop.h"
27 #include "base/path_service.h" 27 #include "base/path_service.h"
28 #include "base/process_util.h" 28 #include "base/process_util.h"
29 #include "base/strings/string_number_conversions.h" 29 #include "base/strings/string_number_conversions.h"
30 #include "base/strings/string_util.h" 30 #include "base/strings/string_util.h"
31 #include "base/strings/utf_string_conversions.h" 31 #include "base/strings/utf_string_conversions.h"
32 #include "base/threading/platform_thread.h" 32 #include "base/threading/platform_thread.h"
33 #include "base/threading/thread.h" 33 #include "base/threading/thread.h"
34 #include "net/base/io_buffer.h" 34 #include "net/base/io_buffer.h"
35 #include "net/base/net_errors.h" 35 #include "net/base/net_errors.h"
36 #include "net/base/test_completion_callback.h" 36 #include "net/base/test_completion_callback.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 long int iteration = strtol(argv[1], &end, 0); 283 long int iteration = strtol(argv[1], &end, 0);
284 284
285 if (!StartCrashThread()) { 285 if (!StartCrashThread()) {
286 printf("failed to start thread\n"); 286 printf("failed to start thread\n");
287 return kError; 287 return kError;
288 } 288 }
289 289
290 StressTheCache(iteration); 290 StressTheCache(iteration);
291 return 0; 291 return 0;
292 } 292 }
OLDNEW
« no previous file with comments | « net/disk_cache/sparse_control.cc ('k') | net/disk_cache/v3/backend_impl_v3.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698