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

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

Issue 18332014: Move Copy* into the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows Created 7 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_base.h" 5 #include "net/disk_cache/disk_cache_test_base.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 19 matching lines...) Expand all
30 bool DiskCacheTest::CopyTestCache(const std::string& name) { 30 bool DiskCacheTest::CopyTestCache(const std::string& name) {
31 base::FilePath path; 31 base::FilePath path;
32 PathService::Get(base::DIR_SOURCE_ROOT, &path); 32 PathService::Get(base::DIR_SOURCE_ROOT, &path);
33 path = path.AppendASCII("net"); 33 path = path.AppendASCII("net");
34 path = path.AppendASCII("data"); 34 path = path.AppendASCII("data");
35 path = path.AppendASCII("cache_tests"); 35 path = path.AppendASCII("cache_tests");
36 path = path.AppendASCII(name); 36 path = path.AppendASCII(name);
37 37
38 if (!CleanupCacheDir()) 38 if (!CleanupCacheDir())
39 return false; 39 return false;
40 return file_util::CopyDirectory(path, cache_path_, false); 40 return base::CopyDirectory(path, cache_path_, false);
41 } 41 }
42 42
43 bool DiskCacheTest::CleanupCacheDir() { 43 bool DiskCacheTest::CleanupCacheDir() {
44 return DeleteCache(cache_path_); 44 return DeleteCache(cache_path_);
45 } 45 }
46 46
47 void DiskCacheTest::TearDown() { 47 void DiskCacheTest::TearDown() {
48 base::RunLoop().RunUntilIdle(); 48 base::RunLoop().RunUntilIdle();
49 } 49 }
50 50
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 EXPECT_TRUE(cache_impl_->SetMaxSize(size_)); 291 EXPECT_TRUE(cache_impl_->SetMaxSize(size_));
292 if (new_eviction_) 292 if (new_eviction_)
293 cache_impl_->SetNewEviction(); 293 cache_impl_->SetNewEviction();
294 cache_impl_->SetType(type_); 294 cache_impl_->SetType(type_);
295 cache_impl_->SetFlags(flags); 295 cache_impl_->SetFlags(flags);
296 net::TestCompletionCallback cb; 296 net::TestCompletionCallback cb;
297 int rv = cache_impl_->Init(cb.callback()); 297 int rv = cache_impl_->Init(cb.callback());
298 ASSERT_EQ(net::OK, cb.GetResult(rv)); 298 ASSERT_EQ(net::OK, cb.GetResult(rv));
299 cache_ = cache_impl_; 299 cache_ = cache_impl_;
300 } 300 }
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_browsertest.cc ('k') | tools/traceline/svgui/startup-release.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698