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 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. | |
Pete Williamson
2016/12/19 21:48:58
It might be nice to beef up this comment a bit to
Dmitry Titov
2016/12/19 22:39:32
Done.
| |
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 |