OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 bool* defer) OVERRIDE; | 35 bool* defer) OVERRIDE; |
36 virtual bool OnResponseStarted(int request_id, | 36 virtual bool OnResponseStarted(int request_id, |
37 content::ResourceResponse* response, | 37 content::ResourceResponse* response, |
38 bool* defer) OVERRIDE; | 38 bool* defer) OVERRIDE; |
39 virtual bool OnWillStart(int request_id, const GURL& url, | 39 virtual bool OnWillStart(int request_id, const GURL& url, |
40 bool* defer) OVERRIDE; | 40 bool* defer) OVERRIDE; |
41 virtual void OnRequestClosed() OVERRIDE; | 41 virtual void OnRequestClosed() OVERRIDE; |
42 | 42 |
43 // ResourceThrottleController implementation: | 43 // ResourceThrottleController implementation: |
44 virtual void Cancel() OVERRIDE; | 44 virtual void Cancel() OVERRIDE; |
| 45 virtual void CancelWithHandledExternallyStatus() OVERRIDE; |
45 virtual void Resume() OVERRIDE; | 46 virtual void Resume() OVERRIDE; |
46 | 47 |
47 private: | 48 private: |
48 virtual ~ThrottlingResourceHandler(); | 49 virtual ~ThrottlingResourceHandler(); |
49 | 50 |
50 void ResumeStart(); | 51 void ResumeStart(); |
51 void ResumeRedirect(); | 52 void ResumeRedirect(); |
52 void ResumeResponse(); | 53 void ResumeResponse(); |
53 | 54 |
54 enum DeferredStage { | 55 enum DeferredStage { |
(...skipping 11 matching lines...) Expand all Loading... |
66 ScopedVector<ResourceThrottle> throttles_; | 67 ScopedVector<ResourceThrottle> throttles_; |
67 size_t index_; | 68 size_t index_; |
68 | 69 |
69 GURL deferred_url_; | 70 GURL deferred_url_; |
70 scoped_refptr<ResourceResponse> deferred_response_; | 71 scoped_refptr<ResourceResponse> deferred_response_; |
71 }; | 72 }; |
72 | 73 |
73 } // namespace content | 74 } // namespace content |
74 | 75 |
75 #endif // CONTENT_BROWSER_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ | 76 #endif // CONTENT_BROWSER_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ |
OLD | NEW |