| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 WEBKIT_APPCACHE_APPCACHE_INTERCEPTOR_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_INTERCEPTOR_H_ |
| 6 #define WEBKIT_APPCACHE_APPCACHE_INTERCEPTOR_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_INTERCEPTOR_H_ |
| 7 | 7 |
| 8 #include "base/singleton.h" | 8 #include "base/singleton.h" |
| 9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
| 10 #include "net/url_request/url_request.h" | 10 #include "net/url_request/url_request.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 ResourceType::Type resource_type); | 33 ResourceType::Type resource_type); |
| 34 | 34 |
| 35 // May be called after response headers are complete to retrieve extra | 35 // May be called after response headers are complete to retrieve extra |
| 36 // info about the response. | 36 // info about the response. |
| 37 static void GetExtraResponseInfo(URLRequest* request, | 37 static void GetExtraResponseInfo(URLRequest* request, |
| 38 int64* cache_id, | 38 int64* cache_id, |
| 39 GURL* manifest_url); | 39 GURL* manifest_url); |
| 40 | 40 |
| 41 protected: | 41 protected: |
| 42 // URLRequest::Interceptor overrides | 42 // URLRequest::Interceptor overrides |
| 43 virtual URLRequestJob* MaybeIntercept(URLRequest* request); | 43 virtual net::URLRequestJob* MaybeIntercept(net::URLRequest* request); |
| 44 virtual URLRequestJob* MaybeInterceptResponse(URLRequest* request); | 44 virtual net::URLRequestJob* MaybeInterceptResponse(net::URLRequest* request); |
| 45 virtual URLRequestJob* MaybeInterceptRedirect(URLRequest* request, | 45 virtual net::URLRequestJob* MaybeInterceptRedirect(net::URLRequest* request, |
| 46 const GURL& location); | 46 const GURL& location); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 friend struct DefaultSingletonTraits<AppCacheInterceptor>; | 49 friend struct DefaultSingletonTraits<AppCacheInterceptor>; |
| 50 | 50 |
| 51 static AppCacheInterceptor* instance() { | 51 static AppCacheInterceptor* instance() { |
| 52 return Singleton<AppCacheInterceptor>::get(); | 52 return Singleton<AppCacheInterceptor>::get(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 AppCacheInterceptor(); | 55 AppCacheInterceptor(); |
| 56 virtual ~AppCacheInterceptor(); | 56 virtual ~AppCacheInterceptor(); |
| 57 | 57 |
| 58 static void SetHandler(URLRequest* request, AppCacheRequestHandler* handler); | 58 static void SetHandler(net::URLRequest* request, |
| 59 static AppCacheRequestHandler* GetHandler(URLRequest* request); | 59 AppCacheRequestHandler* handler); |
| 60 static AppCacheRequestHandler* GetHandler(net::URLRequest* request); |
| 60 | 61 |
| 61 DISALLOW_COPY_AND_ASSIGN(AppCacheInterceptor); | 62 DISALLOW_COPY_AND_ASSIGN(AppCacheInterceptor); |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } // namespace appcache | 65 } // namespace appcache |
| 65 | 66 |
| 66 #endif // WEBKIT_APPCACHE_APPCACHE_INTERCEPTOR_H_ | 67 #endif // WEBKIT_APPCACHE_APPCACHE_INTERCEPTOR_H_ |
| OLD | NEW |