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

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

Issue 276016: Remove some deprecated file_util wstring functions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: lint Created 11 years, 2 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 | « chrome/tools/crash_service/main.cc ('k') | skia/ext/vector_canvas_unittest.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-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 L"remove_load1", 104 L"remove_load1",
105 L"remove_load2", 105 L"remove_load2",
106 L"remove_load3" 106 L"remove_load3"
107 }; 107 };
108 COMPILE_ASSERT(arraysize(folders) == disk_cache::MAX_CRASH, sync_folders); 108 COMPILE_ASSERT(arraysize(folders) == disk_cache::MAX_CRASH, sync_folders);
109 DCHECK(action > disk_cache::NO_CRASH && action < disk_cache::MAX_CRASH); 109 DCHECK(action > disk_cache::NO_CRASH && action < disk_cache::MAX_CRASH);
110 110
111 *full_path = path; 111 *full_path = path;
112 file_util::AppendToPath(full_path, folders[action]); 112 file_util::AppendToPath(full_path, folders[action]);
113 113
114 if (file_util::PathExists(*full_path)) 114 if (file_util::PathExists(FilePath::FromWStringHack(*full_path)))
115 return false; 115 return false;
116 116
117 return file_util::CreateDirectory(*full_path); 117 return file_util::CreateDirectory(*full_path);
118 } 118 }
119 119
120 // Generates the files for an empty and one item cache. 120 // Generates the files for an empty and one item cache.
121 int SimpleInsert(const std::wstring& path, RankCrashes action) { 121 int SimpleInsert(const std::wstring& path, RankCrashes action) {
122 disk_cache::Backend* cache = disk_cache::CreateCacheBackend(path, false, 0, 122 disk_cache::Backend* cache = disk_cache::CreateCacheBackend(path, false, 0,
123 net::DISK_CACHE); 123 net::DISK_CACHE);
124 if (!cache || cache->GetEntryCount()) 124 if (!cache || cache->GetEntryCount())
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 FilePath path; 304 FilePath path;
305 PathService::Get(base::DIR_SOURCE_ROOT, &path); 305 PathService::Get(base::DIR_SOURCE_ROOT, &path);
306 path = path.AppendASCII("net"); 306 path = path.AppendASCII("net");
307 path = path.AppendASCII("data"); 307 path = path.AppendASCII("data");
308 path = path.AppendASCII("cache_tests"); 308 path = path.AppendASCII("cache_tests");
309 path = path.AppendASCII("new_crashes"); 309 path = path.AppendASCII("new_crashes");
310 310
311 return SlaveCode(path.ToWStringHack(), action); 311 return SlaveCode(path.ToWStringHack(), action);
312 } 312 }
OLDNEW
« no previous file with comments | « chrome/tools/crash_service/main.cc ('k') | skia/ext/vector_canvas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698