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

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: 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
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..8f4bc095dc41acbdf454cb5a0a353a579e64af7d 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,39 @@
#include "base/macros.h"
#include "net/url_request/url_request_interceptor.h"
namespace net {
class NetworkDelegate;
class URLRequest;
class URLRequestJob;
}
+namespace previews {
+class PreviewsBlackList;
+}
+
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();
+ OfflinePageRequestInterceptor(
tbansal1 2016/10/04 12:38:04 explicit
RyanSturm 2016/10/04 21:36:37 Done.
+ previews::PreviewsBlackList* previews_black_list);
~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::PreviewsBlackList* previews_black_list_;
jianli 2016/10/03 22:56:05 Who owns this? What's lifetime model for this? It
RyanSturm 2016/10/03 23:54:38 This is owned by PreviewsIOData, which is created
+
DISALLOW_COPY_AND_ASSIGN(OfflinePageRequestInterceptor);
};
} // namespace offline_pages
#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_REQUEST_INTERCEPTOR_H_

Powered by Google App Engine
This is Rietveld 408576698