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

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

Issue 18499: Replace cases of Append(FILE_PATH_LITERAL()) with AppendASCII(""). (Closed)
Patch Set: Created 11 years, 11 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
« no previous file with comments | « net/base/ssl_test_util.cc ('k') | net/proxy/proxy_script_fetcher_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 #include <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/perftimer.h" 10 #include "base/perftimer.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 int ret = TimeWrite(num_entries, cache, &entries); 170 int ret = TimeWrite(num_entries, cache, &entries);
171 EXPECT_EQ(ret, g_cache_tests_received); 171 EXPECT_EQ(ret, g_cache_tests_received);
172 172
173 MessageLoop::current()->RunAllPending(); 173 MessageLoop::current()->RunAllPending();
174 delete cache; 174 delete cache;
175 175
176 FilePath path = FilePath::FromWStringHack(path_wstring); 176 FilePath path = FilePath::FromWStringHack(path_wstring);
177 177
178 ASSERT_TRUE(file_util::EvictFileFromSystemCache( 178 ASSERT_TRUE(file_util::EvictFileFromSystemCache(
179 path.Append(FILE_PATH_LITERAL("index")))); 179 path.AppendASCII("index")));
180 ASSERT_TRUE(file_util::EvictFileFromSystemCache( 180 ASSERT_TRUE(file_util::EvictFileFromSystemCache(
181 path.Append(FILE_PATH_LITERAL("data_0")))); 181 path.AppendASCII("data_0")));
182 ASSERT_TRUE(file_util::EvictFileFromSystemCache( 182 ASSERT_TRUE(file_util::EvictFileFromSystemCache(
183 path.Append(FILE_PATH_LITERAL("data_1")))); 183 path.AppendASCII("data_1")));
184 ASSERT_TRUE(file_util::EvictFileFromSystemCache( 184 ASSERT_TRUE(file_util::EvictFileFromSystemCache(
185 path.Append(FILE_PATH_LITERAL("data_2")))); 185 path.AppendASCII("data_2")));
186 ASSERT_TRUE(file_util::EvictFileFromSystemCache( 186 ASSERT_TRUE(file_util::EvictFileFromSystemCache(
187 path.Append(FILE_PATH_LITERAL("data_3")))); 187 path.AppendASCII("data_3")));
188 188
189 cache = disk_cache::CreateCacheBackend(path_wstring, false, 0); 189 cache = disk_cache::CreateCacheBackend(path_wstring, false, 0);
190 ASSERT_TRUE(NULL != cache); 190 ASSERT_TRUE(NULL != cache);
191 191
192 ret = TimeRead(num_entries, cache, entries, true); 192 ret = TimeRead(num_entries, cache, entries, true);
193 EXPECT_EQ(ret, g_cache_tests_received); 193 EXPECT_EQ(ret, g_cache_tests_received);
194 194
195 ret = TimeRead(num_entries, cache, entries, false); 195 ret = TimeRead(num_entries, cache, entries, false);
196 EXPECT_EQ(ret, g_cache_tests_received); 196 EXPECT_EQ(ret, g_cache_tests_received);
197 197
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 entry = 0; 238 entry = 0;
239 239
240 files.DeleteBlock(address[entry], false); 240 files.DeleteBlock(address[entry], false);
241 EXPECT_TRUE(files.CreateBlock(disk_cache::RANKINGS, BlockSize(), 241 EXPECT_TRUE(files.CreateBlock(disk_cache::RANKINGS, BlockSize(),
242 &address[entry])); 242 &address[entry]));
243 } 243 }
244 244
245 timer2.Done(); 245 timer2.Done();
246 MessageLoop::current()->RunAllPending(); 246 MessageLoop::current()->RunAllPending();
247 } 247 }
OLDNEW
« no previous file with comments | « net/base/ssl_test_util.cc ('k') | net/proxy/proxy_script_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698