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

Unified Diff: chrome/browser/android/offline_pages/offline_page_request_interceptor.h

Issue 2388253002: Use the previews black list for offline previews (Closed)
Patch Set: mmenke comments Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_request_interceptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/offline_pages/offline_page_request_interceptor.h
diff --git a/chrome/browser/android/offline_pages/offline_page_request_interceptor.h b/chrome/browser/android/offline_pages/offline_page_request_interceptor.h
index 0c94b9a7fbb9541a21b701185ad76aec6d6a24cf..f5b3dae5759b353b24d245e695287f3037d4e84b 100644
--- a/chrome/browser/android/offline_pages/offline_page_request_interceptor.h
+++ b/chrome/browser/android/offline_pages/offline_page_request_interceptor.h
@@ -7,31 +7,40 @@
#include "base/macros.h"
#include "net/url_request/url_request_interceptor.h"
namespace net {
class NetworkDelegate;
class URLRequest;
class URLRequestJob;
}
+namespace previews {
+class PreviewsDecider;
+}
+
namespace offline_pages {
// An interceptor to hijack requests and potentially service them based on
// their offline information. Created one per profile.
class OfflinePageRequestInterceptor : public net::URLRequestInterceptor {
public:
- OfflinePageRequestInterceptor();
+ // Embedder must guarantee that |previews_decider| outlives |this|.
+ explicit OfflinePageRequestInterceptor(
+ previews::PreviewsDecider* previews_decider);
~OfflinePageRequestInterceptor() override;
private:
// Overrides from net::URLRequestInterceptor:
net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const override;
+ // Used to determine if an URLRequest is eligible for offline previews.
+ previews::PreviewsDecider* previews_decider_;
+
DISALLOW_COPY_AND_ASSIGN(OfflinePageRequestInterceptor);
};
} // namespace offline_pages
#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_REQUEST_INTERCEPTOR_H_
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_request_interceptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698