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

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

Issue 183008: Avoids the use of "namespace using-directives" in a few places.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: with gfx:: Created 11 years, 3 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 | « app/gfx/text_elider_unittest.cc ('k') | skia/ext/image_operations.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-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 #include "net/disk_cache/disk_cache_test_util.h" 5 #include "net/disk_cache/disk_cache_test_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 if (len && !buffer[0]) 53 if (len && !buffer[0])
54 buffer[0] = 'g'; 54 buffer[0] = 'g';
55 } 55 }
56 56
57 std::wstring GetCachePath() { 57 std::wstring GetCachePath() {
58 return BuildCachePath(L"cache_test"); 58 return BuildCachePath(L"cache_test");
59 } 59 }
60 60
61 bool CreateCacheTestFile(const wchar_t* name) { 61 bool CreateCacheTestFile(const wchar_t* name) {
62 using namespace disk_cache;
63 int flags = base::PLATFORM_FILE_CREATE_ALWAYS | 62 int flags = base::PLATFORM_FILE_CREATE_ALWAYS |
64 base::PLATFORM_FILE_READ | 63 base::PLATFORM_FILE_READ |
65 base::PLATFORM_FILE_WRITE; 64 base::PLATFORM_FILE_WRITE;
66 65
67 scoped_refptr<File> file(new File( 66 scoped_refptr<disk_cache::File> file(new disk_cache::File(
68 base::CreatePlatformFile(name, flags, NULL))); 67 base::CreatePlatformFile(name, flags, NULL)));
69 if (!file->IsValid()) 68 if (!file->IsValid())
70 return false; 69 return false;
71 70
72 file->SetLength(4 * 1024 * 1024); 71 file->SetLength(4 * 1024 * 1024);
73 return true; 72 return true;
74 } 73 }
75 74
76 bool DeleteCache(const wchar_t* path) { 75 bool DeleteCache(const wchar_t* path) {
77 disk_cache::DeleteCache(path, false); 76 disk_cache::DeleteCache(path, false);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } else { 162 } else {
164 // Not finished yet. See if we have to abort. 163 // Not finished yet. See if we have to abort.
165 if (last_ == g_cache_tests_received) 164 if (last_ == g_cache_tests_received)
166 num_iterations_++; 165 num_iterations_++;
167 else 166 else
168 last_ = g_cache_tests_received; 167 last_ = g_cache_tests_received;
169 if (40 == num_iterations_) 168 if (40 == num_iterations_)
170 MessageLoop::current()->Quit(); 169 MessageLoop::current()->Quit();
171 } 170 }
172 } 171 }
OLDNEW
« no previous file with comments | « app/gfx/text_elider_unittest.cc ('k') | skia/ext/image_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698