Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: chrome/browser/android/offline_pages/downloads/resource_throttle.h

Issue 2528483003: [Android Downloads] Long-press menu item "Download Link" should delegate job to OfflinePages backen… (Closed)
Patch Set: git merge resolved Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 // This ResourceThrottle is used to hook up into the loading process at the
15 // moment when headers are available (WillProcessResponse) to determine if the
16 // download has text/html mime type and should be canceled as a download and
17 // re-scheduled as a OfflinePage download request. This will be handled by
18 // Offline Page backend as a full page download rather than a single .html
19 // file download.
20 class ResourceThrottle : public content::ResourceThrottle {
21 public:
22 explicit ResourceThrottle(const net::URLRequest* request);
23 ~ResourceThrottle() override;
24
25 // content::ResourceThrottle implementation:
26 void WillProcessResponse(bool* defer) override;
27 const char* GetNameForLogging() const override;
28
29 private:
30 const net::URLRequest* request_;
31
32 DISALLOW_COPY_AND_ASSIGN(ResourceThrottle);
33 };
34
35 } // namespace downloads
36 } // namespace offline_pages
37
38 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_DOWNLOADS_RESOURCE_THROTTLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/android/offline_pages/downloads/resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698