summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/sparse_control.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/disk_cache/sparse_control.h')
-rw-r--r--net/disk_cache/sparse_control.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/disk_cache/sparse_control.h b/net/disk_cache/sparse_control.h
index 0005f58..ee77b4b 100644
--- a/net/disk_cache/sparse_control.h
+++ b/net/disk_cache/sparse_control.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009-2010 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.
@@ -52,6 +52,10 @@ class SparseControl {
// on disk and returns net::OK. Otherwise it returns a net error code.
int Init();
+ // Performs a quick test to see if the entry is sparse or not, without
+ // generating disk IO (so the answer provided is only a best effort).
+ bool CouldBeSparse() const;
+
// Performs an actual sparse read or write operation for this entry. |op| is
// the operation to perform, |offset| is the desired sparse offset, |buf| and
// |buf_len| specify the actual data to use and |callback| is the callback