Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
|
asanka
2016/12/07 16:37:40
Nit: copyright header is different now:
https://c
| |
| 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 CHROME_BROWSER_ANDROID_OFFLINE_PAGES_DOWNLOADS_RESOURCE_THROTTLE_H_ | |
| 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_DOWNLOADS_RESOURCE_THROTTLE_H_ | |
| 7 | |
| 8 #include "content/public/browser/resource_throttle.h" | |
| 9 #include "net/url_request/url_request.h" | |
| 10 | |
| 11 namespace offline_pages { | |
| 12 namespace downloads { | |
| 13 | |
| 14 // ResourceThrottle is used to determine if a download has text/html mime type | |
| 15 // and should be handled as a full page download rather than a single .html | |
| 16 // file download. | |
| 17 class ResourceThrottle : public content::ResourceThrottle { | |
| 18 public: | |
| 19 explicit ResourceThrottle(const net::URLRequest* request); | |
| 20 ~ResourceThrottle() override; | |
| 21 | |
| 22 // content::ResourceThrottle implementation: | |
| 23 void WillProcessResponse(bool* defer) override; | |
| 24 const char* GetNameForLogging() const override; | |
| 25 | |
| 26 private: | |
| 27 const net::URLRequest* request_; | |
| 28 | |
| 29 DISALLOW_COPY_AND_ASSIGN(ResourceThrottle); | |
| 30 }; | |
| 31 | |
| 32 } // namespace downloads | |
| 33 } // namespace offline_pages | |
| 34 | |
| 35 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_DOWNLOADS_RESOURCE_THROTTLE_H_ | |
| OLD | NEW |