| 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_LOADER_BUFFERED_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 : public LayeredResourceHandler, | 25 : public LayeredResourceHandler, |
| 26 public ResourceController { | 26 public ResourceController { |
| 27 public: | 27 public: |
| 28 BufferedResourceHandler(scoped_ptr<ResourceHandler> next_handler, | 28 BufferedResourceHandler(scoped_ptr<ResourceHandler> next_handler, |
| 29 ResourceDispatcherHostImpl* host, | 29 ResourceDispatcherHostImpl* host, |
| 30 net::URLRequest* request); | 30 net::URLRequest* request); |
| 31 virtual ~BufferedResourceHandler(); | 31 virtual ~BufferedResourceHandler(); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 // ResourceHandler implementation: | 34 // ResourceHandler implementation: |
| 35 virtual void SetController(ResourceController* controller) OVERRIDE; | 35 virtual void SetController(ResourceController* controller) override; |
| 36 virtual bool OnResponseStarted(ResourceResponse* response, | 36 virtual bool OnResponseStarted(ResourceResponse* response, |
| 37 bool* defer) OVERRIDE; | 37 bool* defer) override; |
| 38 virtual bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 38 virtual bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
| 39 int* buf_size, | 39 int* buf_size, |
| 40 int min_size) OVERRIDE; | 40 int min_size) override; |
| 41 virtual bool OnReadCompleted(int bytes_read, bool* defer) OVERRIDE; | 41 virtual bool OnReadCompleted(int bytes_read, bool* defer) override; |
| 42 virtual void OnResponseCompleted(const net::URLRequestStatus& status, | 42 virtual void OnResponseCompleted(const net::URLRequestStatus& status, |
| 43 const std::string& security_info, | 43 const std::string& security_info, |
| 44 bool* defer) OVERRIDE; | 44 bool* defer) override; |
| 45 | 45 |
| 46 // ResourceController implementation: | 46 // ResourceController implementation: |
| 47 virtual void Resume() OVERRIDE; | 47 virtual void Resume() override; |
| 48 virtual void Cancel() OVERRIDE; | 48 virtual void Cancel() override; |
| 49 virtual void CancelAndIgnore() OVERRIDE; | 49 virtual void CancelAndIgnore() override; |
| 50 virtual void CancelWithError(int error_code) OVERRIDE; | 50 virtual void CancelWithError(int error_code) override; |
| 51 | 51 |
| 52 bool ProcessResponse(bool* defer); | 52 bool ProcessResponse(bool* defer); |
| 53 | 53 |
| 54 bool ShouldSniffContent(); | 54 bool ShouldSniffContent(); |
| 55 bool DetermineMimeType(); | 55 bool DetermineMimeType(); |
| 56 bool SelectNextHandler(bool* defer); | 56 bool SelectNextHandler(bool* defer); |
| 57 bool UseAlternateNextHandler(scoped_ptr<ResourceHandler> handler, | 57 bool UseAlternateNextHandler(scoped_ptr<ResourceHandler> handler, |
| 58 const std::string& payload_for_old_handler); | 58 const std::string& payload_for_old_handler); |
| 59 | 59 |
| 60 bool ReplayReadCompleted(bool* defer); | 60 bool ReplayReadCompleted(bool* defer); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 bool must_download_is_set_; | 101 bool must_download_is_set_; |
| 102 | 102 |
| 103 base::WeakPtrFactory<BufferedResourceHandler> weak_ptr_factory_; | 103 base::WeakPtrFactory<BufferedResourceHandler> weak_ptr_factory_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); | 105 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 } // namespace content | 108 } // namespace content |
| 109 | 109 |
| 110 #endif // CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ | 110 #endif // CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ |
| OLD | NEW |