Index: ios/crnet/crnet_environment.mm |
diff --git a/ios/crnet/crnet_environment.mm b/ios/crnet/crnet_environment.mm |
index d139b7fb4cb96dc93504087bac864e2ba2f67ee5..62e0fbbe25436a40ec6ecf655f46568bd7a89e59 100644 |
--- a/ios/crnet/crnet_environment.mm |
+++ b/ios/crnet/crnet_environment.mm |
@@ -22,6 +22,7 @@ |
#include "crypto/nss_util.h" |
#include "ios/net/cookies/cookie_store_ios.h" |
#include "ios/net/crn_http_protocol_handler.h" |
+#include "ios/net/empty_nsurlcache.h" |
#include "ios/net/request_tracker.h" |
#include "ios/web/public/user_agent.h" |
#include "net/base/net_errors.h" |
@@ -300,7 +301,7 @@ net::URLRequestContextGetter* CrNetEnvironment::GetMainContextGetter() { |
void CrNetEnvironment::SetHTTPProtocolHandlerRegistered(bool registered) { |
if (registered) { |
// Disable the default cache. |
- [NSURLCache setSharedURLCache:nil]; |
+ [NSURLCache setSharedURLCache:[[[EmptyNSURLCache alloc] init] autorelease]]; |
sdefresne
2015/06/10 16:15:55
[EmptyNSURLCache emptyNSURLCache]
justincohen
2015/06/10 16:33:35
Done.
|
// Register the chrome http protocol handler to replace the default one. |
BOOL success = [NSURLProtocol registerClass:[CRNHTTPProtocolHandler class]]; |
DCHECK(success); |