| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_ |
| 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_ |
| 7 | 7 |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/public/common/resource_type.h" | 10 #include "content/public/common/resource_type.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // Should be called early in the IO thread prior to initiating requests. | 24 // Should be called early in the IO thread prior to initiating requests. |
| 25 static void EnsureRegistered() { | 25 static void EnsureRegistered() { |
| 26 CHECK(GetInstance()); | 26 CHECK(GetInstance()); |
| 27 } | 27 } |
| 28 | 28 |
| 29 // Must be called to make a request eligible for retrieval from an appcache. | 29 // Must be called to make a request eligible for retrieval from an appcache. |
| 30 static void SetExtraRequestInfo(net::URLRequest* request, | 30 static void SetExtraRequestInfo(net::URLRequest* request, |
| 31 AppCacheServiceImpl* service, | 31 AppCacheServiceImpl* service, |
| 32 int process_id, | 32 int process_id, |
| 33 int host_id, | 33 int host_id, |
| 34 ResourceType::Type resource_type); | 34 ResourceType resource_type); |
| 35 | 35 |
| 36 // May be called after response headers are complete to retrieve extra | 36 // May be called after response headers are complete to retrieve extra |
| 37 // info about the response. | 37 // info about the response. |
| 38 static void GetExtraResponseInfo(net::URLRequest* request, | 38 static void GetExtraResponseInfo(net::URLRequest* request, |
| 39 int64* cache_id, | 39 int64* cache_id, |
| 40 GURL* manifest_url); | 40 GURL* manifest_url); |
| 41 | 41 |
| 42 // Methods to support cross site navigations. | 42 // Methods to support cross site navigations. |
| 43 static void PrepareForCrossSiteTransfer(net::URLRequest* request, | 43 static void PrepareForCrossSiteTransfer(net::URLRequest* request, |
| 44 int old_process_id); | 44 int old_process_id); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 70 static void SetHandler(net::URLRequest* request, | 70 static void SetHandler(net::URLRequest* request, |
| 71 AppCacheRequestHandler* handler); | 71 AppCacheRequestHandler* handler); |
| 72 static AppCacheRequestHandler* GetHandler(net::URLRequest* request); | 72 static AppCacheRequestHandler* GetHandler(net::URLRequest* request); |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(AppCacheInterceptor); | 74 DISALLOW_COPY_AND_ASSIGN(AppCacheInterceptor); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace content | 77 } // namespace content |
| 78 | 78 |
| 79 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_ | 79 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_ |
| OLD | NEW |