| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_LOADER_CONTENT_SIZE_RESOURCE_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_LOADER_CONTENT_SIZE_RESOURCE_HANDLER_H_ |
| 7 |
| 8 #include <map> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "content/browser/loader/global_routing_id.h" |
| 12 #include "content/browser/loader/layered_resource_handler.h" |
| 13 #include "net/url_request/url_request_status.h" |
| 14 #include "url/gurl.h" |
| 15 |
| 16 namespace net { |
| 17 class URLRequest; |
| 18 } |
| 19 |
| 20 namespace content { |
| 21 |
| 22 class ContentSizeResourceHandlerManager; |
| 23 |
| 24 class ContentSizeResourceHandler : public LayeredResourceHandler { |
| 25 public: |
| 26 ContentSizeResourceHandler(std::unique_ptr<ResourceHandler> next_handler, |
| 27 net::URLRequest* request, |
| 28 ContentSizeResourceHandlerManager* manager); |
| 29 ~ContentSizeResourceHandler() override; |
| 30 |
| 31 private: |
| 32 // ResourceHandler: |
| 33 bool OnWillStart(const GURL&, bool* defer) override; |
| 34 bool OnReadCompleted(int bytes_read, bool* defer) override; |
| 35 void OnResponseCompleted(const net::URLRequestStatus& status, |
| 36 const std::string& security_info, |
| 37 bool* defer) override; |
| 38 |
| 39 ContentSizeResourceHandlerManager* manager_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(ContentSizeResourceHandler); |
| 42 }; |
| 43 |
| 44 } // namespace content |
| 45 |
| 46 #endif // CONTENT_BROWSER_LOADER_CONTENT_SIZE_RESOURCE_HANDLER_H_ |
| OLD | NEW |