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

Unified Diff: net/http/mock_http_cache.h

Issue 20737002: Change the API of disk_cache::CreateCacheBackend to use scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new test 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/mock_http_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/mock_http_cache.h
diff --git a/net/http/mock_http_cache.h b/net/http/mock_http_cache.h
index 11a5a6a609de68bd15f90514422d9733d0b0952f..6cb0e50f56287db00afc8a118f937810e1af684a 100644
--- a/net/http/mock_http_cache.h
+++ b/net/http/mock_http_cache.h
@@ -152,7 +152,7 @@ class MockDiskCache : public disk_cache::Backend {
class MockBackendFactory : public net::HttpCache::BackendFactory {
public:
virtual int CreateBackend(net::NetLog* net_log,
- disk_cache::Backend** backend,
+ scoped_ptr<disk_cache::Backend>* backend,
const net::CompletionCallback& callback) OVERRIDE;
};
@@ -206,7 +206,7 @@ class MockDiskCacheNoCB : public MockDiskCache {
class MockBackendNoCbFactory : public net::HttpCache::BackendFactory {
public:
virtual int CreateBackend(net::NetLog* net_log,
- disk_cache::Backend** backend,
+ scoped_ptr<disk_cache::Backend>* backend,
const net::CompletionCallback& callback) OVERRIDE;
};
@@ -217,14 +217,14 @@ class MockBlockingBackendFactory : public net::HttpCache::BackendFactory {
virtual ~MockBlockingBackendFactory();
virtual int CreateBackend(net::NetLog* net_log,
- disk_cache::Backend** backend,
+ scoped_ptr<disk_cache::Backend>* backend,
const net::CompletionCallback& callback) OVERRIDE;
// Completes the backend creation. Any blocked call will be notified via the
// provided callback.
void FinishCreation();
- disk_cache::Backend** backend() { return backend_; }
+ scoped_ptr<disk_cache::Backend>* backend() { return backend_; }
void set_fail(bool fail) { fail_ = fail; }
const net::CompletionCallback& callback() { return callback_; }
@@ -232,7 +232,7 @@ class MockBlockingBackendFactory : public net::HttpCache::BackendFactory {
private:
int Result() { return fail_ ? net::ERR_FAILED : net::OK; }
- disk_cache::Backend** backend_;
+ scoped_ptr<disk_cache::Backend>* backend_;
net::CompletionCallback callback_;
bool block_;
bool fail_;
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/mock_http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698