summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/disk_cache_test_util.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-18 23:46:58 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-18 23:46:58 +0000
commit84d4ceeee6546783aff920ba0625c0ce01f624ef (patch)
tree502d43daabfcabfc08a8b5b24cf302ddbe265cfa /net/disk_cache/disk_cache_test_util.cc
parenta8c1a314d8277b7ce4f701ce73957146e61a215f (diff)
downloadchromium_src-84d4ceeee6546783aff920ba0625c0ce01f624ef.zip
chromium_src-84d4ceeee6546783aff920ba0625c0ce01f624ef.tar.gz
chromium_src-84d4ceeee6546783aff920ba0625c0ce01f624ef.tar.bz2
Disk cache: First pass to add support for sparse entries.
Adding Read/Write support. BUG=12258 TEST=unittests. original review: http://codereview.chromium.org/126179 Review URL: http://codereview.chromium.org/132031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18772 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/disk_cache_test_util.cc')
-rw-r--r--net/disk_cache/disk_cache_test_util.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/disk_cache/disk_cache_test_util.cc b/net/disk_cache/disk_cache_test_util.cc
index b05f59d..e4d3fb7 100644
--- a/net/disk_cache/disk_cache_test_util.cc
+++ b/net/disk_cache/disk_cache_test_util.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/file_util.h"
#include "base/path_service.h"
+#include "net/base/net_errors.h"
#include "net/disk_cache/backend_impl.h"
#include "net/disk_cache/cache_util.h"
#include "net/disk_cache/file.h"
@@ -118,11 +119,20 @@ void CallbackTest::RunWithParams(const Tuple1<int>& params) {
reuse_++;
}
+ result_ = params.a;
g_cache_tests_received++;
}
// -----------------------------------------------------------------------
+int SimpleCallbackTest::GetResult(int result) {
+ if (net::ERR_IO_PENDING != result)
+ return result;
+ return WaitForResult();
+}
+
+// -----------------------------------------------------------------------
+
MessageLoopHelper::MessageLoopHelper()
: num_callbacks_(0),
num_iterations_(0),