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

Side by Side Diff: net/disk_cache/disk_cache_test_util.h

Issue 274012: Convert BlockFiles to use FilePath instead of wstring. (Closed)
Patch Set: rebase 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
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 #ifndef NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_ 5 #ifndef NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_
6 #define NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_ 6 #define NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/task.h" 12 #include "base/task.h"
13 #include "base/timer.h" 13 #include "base/timer.h"
14 #include "net/base/test_completion_callback.h" 14 #include "net/base/test_completion_callback.h"
15 15
16 class FilePath;
17
16 // Re-creates a given test file inside the cache test folder. 18 // Re-creates a given test file inside the cache test folder.
17 bool CreateCacheTestFile(const wchar_t* name); 19 bool CreateCacheTestFile(const wchar_t* name);
18 20
19 // Deletes all file son the cache. 21 // Deletes all file son the cache.
22 bool DeleteCache(const FilePath& path);
23 // Deprecated.
20 bool DeleteCache(const wchar_t* path); 24 bool DeleteCache(const wchar_t* path);
21 25
22 // Gets the path to the cache test folder. 26 // Gets the path to the cache test folder.
23 std::wstring GetCachePath(); 27 std::wstring GetCachePath();
24 28
25 // Fills buffer with random values (may contain nulls unless no_nulls is true). 29 // Fills buffer with random values (may contain nulls unless no_nulls is true).
26 void CacheTestFillBuffer(char* buffer, size_t len, bool no_nulls); 30 void CacheTestFillBuffer(char* buffer, size_t len, bool no_nulls);
27 31
28 // Deletes all files matching a pattern. 32 // Deletes all files matching a pattern.
29 // Do not call this function with "*" as search_name. 33 // Do not call this function with "*" as search_name.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 base::RepeatingTimer<MessageLoopHelper> timer_; 117 base::RepeatingTimer<MessageLoopHelper> timer_;
114 int num_callbacks_; 118 int num_callbacks_;
115 int num_iterations_; 119 int num_iterations_;
116 int last_; 120 int last_;
117 bool completed_; 121 bool completed_;
118 122
119 DISALLOW_COPY_AND_ASSIGN(MessageLoopHelper); 123 DISALLOW_COPY_AND_ASSIGN(MessageLoopHelper);
120 }; 124 };
121 125
122 #endif // NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_ 126 #endif // NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698