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

Unified Diff: net/disk_cache/disk_cache.h

Issue 983007: Http cache: Add support for a dedicated cache thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/http/http_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_cache.h
===================================================================
--- net/disk_cache/disk_cache.h (revision 45869)
+++ net/disk_cache/disk_cache.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-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.
@@ -17,6 +17,7 @@
#include "net/base/completion_callback.h"
class FilePath;
+class MessageLoop;
namespace net {
class IOBuffer;
@@ -56,14 +57,16 @@
// If |force| is true, and there is a problem with the cache initialization, the
// files will be deleted and a new set will be created. |max_bytes| is the
// maximum size the cache can grow to. If zero is passed in as |max_bytes|, the
-// cache will determine the value to use. The returned pointer can be NULL if a
-// fatal error is found. The actual return value of the function is a net error
-// code. If this function returns ERR_IO_PENDING, the |callback| will be invoked
-// when a backend is available or a fatal error condition is reached. The
-// pointer to receive the |backend| must remain valid until the operation
-// completes.
+// cache will determine the value to use. |thread| can be used to perform IO
+// operations if a dedicated thread is required; a valid value is expected for
+// any backend that performs operations on a disk. The returned pointer can be
+// NULL if a fatal error is found. The actual return value of the function is a
+// net error code. If this function returns ERR_IO_PENDING, the |callback| will
+// be invoked when a backend is available or a fatal error condition is reached.
+// The pointer to receive the |backend| must remain valid until the operation
+// completes (the callback is notified).
int CreateCacheBackend(net::CacheType type, const FilePath& path, int max_bytes,
- bool force, Backend** backend,
+ bool force, MessageLoop* thread, Backend** backend,
CompletionCallback* callback);
// The root interface for a disk cache instance.
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/http/http_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698