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

Unified Diff: mojo/services/network/network_context.h

Issue 1344853002: Teach the network service to clear its disk cache if requested. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 5 years, 3 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
Index: mojo/services/network/network_context.h
diff --git a/mojo/services/network/network_context.h b/mojo/services/network/network_context.h
index 96e8d684457efeee1fd1f181f9515477bb0639b9..9f058a4fee462163a4572fddc5b1dae6f68f0dea 100644
--- a/mojo/services/network/network_context.h
+++ b/mojo/services/network/network_context.h
@@ -8,7 +8,9 @@
#include <set>
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/task_runner.h"
namespace base {
class FilePath;
@@ -24,9 +26,15 @@ class URLLoaderImpl;
class NetworkContext {
public:
+ // Cleares the cached content. The actual deletion will be performed using the
+ // given task runner, but cache appears as cleared immediately after the
+ // function returns.
+ static void ClearCache(const base::FilePath& base_path,
+ scoped_refptr<base::TaskRunner> task_runner);
+
explicit NetworkContext(
scoped_ptr<net::URLRequestContext> url_request_context);
- explicit NetworkContext(const base::FilePath& base_path);
+ NetworkContext(const base::FilePath& base_path);
qsr 2015/09/16 13:27:05 Why did you remove this explicit?
ppi 2015/09/16 14:20:59 accident:). Done.
~NetworkContext();
net::URLRequestContext* url_request_context() {
« no previous file with comments | « no previous file | mojo/services/network/network_context.cc » ('j') | mojo/services/network/network_service_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698