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 #include "chrome/browser/android/offline_pages/offline_page_request_interceptor. h" | |
6 | |
7 #include "base/supports_user_data.h" | |
8 #include "chrome/browser/android/offline_pages/offline_page_request_job.h" | |
9 | |
10 namespace offline_pages { | |
11 | |
12 OfflinePageRequestInterceptor::OfflinePageRequestInterceptor(void* profile_id) | |
13 : profile_id_(profile_id) { | |
14 DCHECK(profile_id); | |
15 } | |
16 | |
17 OfflinePageRequestInterceptor::~OfflinePageRequestInterceptor() {} | |
18 | |
19 net::URLRequestJob* OfflinePageRequestInterceptor::MaybeInterceptRequest( | |
20 net::URLRequest* request, | |
21 net::NetworkDelegate* network_delegate) const { | |
22 return OfflinePageRequestJob::Create(profile_id_, request, network_delegate); | |
mmenke
2016/08/19 15:04:09
I don't think we need to intercept every single re
jianli
2016/08/19 19:34:56
I've already put the rejection logic in OfflinePag
| |
23 } | |
24 | |
25 } // namespace offline_pages | |
OLD | NEW |