summaryrefslogtreecommitdiffstats
path: root/src/core/url_request_context_getter_qt.cpp
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2016-01-26 06:29:48 -0800
committerSzabolcs David <davidsz@inf.u-szeged.hu>2016-01-27 23:25:20 +0000
commitd86feb3afcaacd57e3d661b969db173dea075f96 (patch)
treee4b58591849936890fc866c5ec848110efa6bd22 /src/core/url_request_context_getter_qt.cpp
parent2d3a5c7a4e78cdbd973416ea8fdaea6e2fb4ddb7 (diff)
Extend HttpCacheType with NoCache option
Add option to disable cache with passing NULL as cache backend. It behaves the same way as using HttpCache::set_mode(DISABLE), but saves some memory without instantiating backend factory. Change-Id: I1565cc773eda21a6bc73eebe14ab8046252a7755 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/core/url_request_context_getter_qt.cpp')
-rw-r--r--src/core/url_request_context_getter_qt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index ed3378b21..d5d776732 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -368,6 +368,9 @@ void URLRequestContextGetterQt::generateHttpCache()
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)
);
break;
+ case BrowserContextAdapter::NoCache:
+ // It's safe to not create BackendFactory.
+ break;
}
net::HttpCache *cache = 0;