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_DOOMED_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_DOOMED_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_DOOMED_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_DOOMED_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/browser/renderer_host/resource_handler.h" | 9 #include "content/browser/loader/resource_handler.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 // ResourceHandler that DCHECKs on all events but canceling and failing of | 13 // ResourceHandler that DCHECKs on all events but canceling and failing of |
14 // requests while activated for a URLRequest. | 14 // requests while activated for a URLRequest. |
15 class DoomedResourceHandler : public ResourceHandler { | 15 class DoomedResourceHandler : public ResourceHandler { |
16 public: | 16 public: |
17 // As the DoomedResourceHandler is constructed and substituted from code | 17 // As the DoomedResourceHandler is constructed and substituted from code |
18 // of another ResourceHandler, we need to make sure that this other handler | 18 // of another ResourceHandler, we need to make sure that this other handler |
19 // does not lose its last reference and gets destroyed by being substituted. | 19 // does not lose its last reference and gets destroyed by being substituted. |
(...skipping 30 matching lines...) Expand all Loading... |
50 int bytes_downloaded) OVERRIDE; | 50 int bytes_downloaded) OVERRIDE; |
51 | 51 |
52 private: | 52 private: |
53 scoped_ptr<ResourceHandler> old_handler_; | 53 scoped_ptr<ResourceHandler> old_handler_; |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(DoomedResourceHandler); | 55 DISALLOW_COPY_AND_ASSIGN(DoomedResourceHandler); |
56 }; | 56 }; |
57 | 57 |
58 } // namespace content | 58 } // namespace content |
59 | 59 |
60 #endif // CONTENT_BROWSER_RENDERER_HOST_DOOMED_RESOURCE_HANDLER_H_ | 60 #endif // CONTENT_BROWSER_LOADER_DOOMED_RESOURCE_HANDLER_H_ |
OLD | NEW |