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

Side by Side Diff: base/test_file_util_posix.cc

Issue 113229: Add new tab startup test to the linux & mac build. (Closed)
Patch Set: make the test actually run Created 11 years, 7 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/test_file_util.h" 5 #include "base/test_file_util.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fts.h> 8 #include <fts.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 if (errno != EEXIST) 56 if (errno != EEXIST)
57 error = errno; 57 error = errno;
58 } 58 }
59 break; 59 break;
60 case FTS_F: // Regular file. 60 case FTS_F: // Regular file.
61 case FTS_NSOK: // File, no stat info requested. 61 case FTS_NSOK: // File, no stat info requested.
62 { 62 {
63 errno = 0; 63 errno = 0;
64 FilePath source_path(ent->fts_path); 64 FilePath source_path(ent->fts_path);
65 if (CopyFile(source_path, target_path)) { 65 if (CopyFile(source_path, target_path)) {
66 bool success = EvictFileFromSystemCache( 66 bool success = EvictFileFromSystemCache(target_path);
67 target_path.Append(source_path.BaseName()));
68 DCHECK(success); 67 DCHECK(success);
69 } else { 68 } else {
70 error = errno ? errno : EINVAL; 69 error = errno ? errno : EINVAL;
71 } 70 }
72 } 71 }
73 break; 72 break;
74 case FTS_DP: // Postorder directory. 73 case FTS_DP: // Postorder directory.
75 case FTS_DOT: // "." or ".." 74 case FTS_DOT: // "." or ".."
76 // Skip it. 75 // Skip it.
77 continue; 76 continue;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 109 }
111 110
112 if (error) { 111 if (error) {
113 LOG(ERROR) << strerror(error); 112 LOG(ERROR) << strerror(error);
114 return false; 113 return false;
115 } 114 }
116 return true; 115 return true;
117 } 116 }
118 117
119 } // namespace file_util 118 } // namespace file_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider.cc » ('j') | chrome/browser/automation/automation_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698