| 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_MIME_SNIFFING_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_MIME_SNIFFING_RESOURCE_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_LOADER_MIME_SNIFFING_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_MIME_SNIFFING_RESOURCE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 STATE_STREAMING, | 82 STATE_STREAMING, |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 // ResourceHandler implementation: | 85 // ResourceHandler implementation: |
| 86 void OnWillStart(const GURL&, | 86 void OnWillStart(const GURL&, |
| 87 std::unique_ptr<ResourceController> controller) override; | 87 std::unique_ptr<ResourceController> controller) override; |
| 88 void OnResponseStarted( | 88 void OnResponseStarted( |
| 89 ResourceResponse* response, | 89 ResourceResponse* response, |
| 90 std::unique_ptr<ResourceController> controller) override; | 90 std::unique_ptr<ResourceController> controller) override; |
| 91 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 91 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
| 92 int* buf_size, | 92 int* buf_size) override; |
| 93 int min_size) override; | |
| 94 void OnReadCompleted(int bytes_read, | 93 void OnReadCompleted(int bytes_read, |
| 95 std::unique_ptr<ResourceController> controller) override; | 94 std::unique_ptr<ResourceController> controller) override; |
| 96 void OnResponseCompleted( | 95 void OnResponseCompleted( |
| 97 const net::URLRequestStatus& status, | 96 const net::URLRequestStatus& status, |
| 98 std::unique_ptr<ResourceController> controller) override; | 97 std::unique_ptr<ResourceController> controller) override; |
| 99 | 98 |
| 100 void ResumeInternal(); | 99 void ResumeInternal(); |
| 101 | 100 |
| 102 // -------------------------------------------------------------------------- | 101 // -------------------------------------------------------------------------- |
| 103 // The following methods replay the buffered data to the downstream | 102 // The following methods replay the buffered data to the downstream |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 bool advance_state_; | 182 bool advance_state_; |
| 184 | 183 |
| 185 base::WeakPtrFactory<MimeSniffingResourceHandler> weak_ptr_factory_; | 184 base::WeakPtrFactory<MimeSniffingResourceHandler> weak_ptr_factory_; |
| 186 | 185 |
| 187 DISALLOW_COPY_AND_ASSIGN(MimeSniffingResourceHandler); | 186 DISALLOW_COPY_AND_ASSIGN(MimeSniffingResourceHandler); |
| 188 }; | 187 }; |
| 189 | 188 |
| 190 } // namespace content | 189 } // namespace content |
| 191 | 190 |
| 192 #endif // CONTENT_BROWSER_LOADER_MIME_SNIFFING_RESOURCE_HANDLER_H_ | 191 #endif // CONTENT_BROWSER_LOADER_MIME_SNIFFING_RESOURCE_HANDLER_H_ |
| OLD | NEW |