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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_request_interceptor.cc

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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/offline_pages/offline_page_request_interceptor. h" 5 #include "chrome/browser/android/offline_pages/offline_page_request_interceptor. h"
6 6
7 #include "base/supports_user_data.h" 7 #include "base/supports_user_data.h"
8 #include "chrome/browser/android/offline_pages/offline_page_request_job.h" 8 #include "chrome/browser/android/offline_pages/offline_page_request_job.h"
9 9
10 namespace offline_pages { 10 namespace offline_pages {
11 11
12 OfflinePageRequestInterceptor::OfflinePageRequestInterceptor() {} 12 OfflinePageRequestInterceptor::OfflinePageRequestInterceptor(
13 previews::PreviewsBlackList* previews_black_list)
14 : previews_black_list_(previews_black_list) {}
13 15
14 OfflinePageRequestInterceptor::~OfflinePageRequestInterceptor() {} 16 OfflinePageRequestInterceptor::~OfflinePageRequestInterceptor() {}
15 17
16 net::URLRequestJob* OfflinePageRequestInterceptor::MaybeInterceptRequest( 18 net::URLRequestJob* OfflinePageRequestInterceptor::MaybeInterceptRequest(
17 net::URLRequest* request, 19 net::URLRequest* request,
18 net::NetworkDelegate* network_delegate) const { 20 net::NetworkDelegate* network_delegate) const {
19 // OfflinePageRequestJob::Create may return a nullptr if the interception 21 // OfflinePageRequestJob::Create may return a nullptr if the interception
20 // is not needed for some sort of requests, like non-main resource request, 22 // is not needed for some sort of requests, like non-main resource request,
21 // non-http request and more. 23 // non-http request and more.
22 return OfflinePageRequestJob::Create(request, network_delegate); 24 return OfflinePageRequestJob::Create(request, network_delegate,
25 previews_black_list_);
23 } 26 }
24 27
25 } // namespace offline_pages 28 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698