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

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

Issue 2322833002: Support serving offline page by offline ID (Closed)
Patch Set: Remove unused variable to fix trybot Created 4 years, 3 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(void* profile_id) 12 OfflinePageRequestInterceptor::OfflinePageRequestInterceptor() {}
13 : profile_id_(profile_id) {
14 DCHECK(profile_id);
15 }
16 13
17 OfflinePageRequestInterceptor::~OfflinePageRequestInterceptor() {} 14 OfflinePageRequestInterceptor::~OfflinePageRequestInterceptor() {}
18 15
19 net::URLRequestJob* OfflinePageRequestInterceptor::MaybeInterceptRequest( 16 net::URLRequestJob* OfflinePageRequestInterceptor::MaybeInterceptRequest(
20 net::URLRequest* request, 17 net::URLRequest* request,
21 net::NetworkDelegate* network_delegate) const { 18 net::NetworkDelegate* network_delegate) const {
22 // OfflinePageRequestJob::Create may return a nullptr if the interception 19 // OfflinePageRequestJob::Create may return a nullptr if the interception
23 // is not needed for some sort of requests, like non-main resource request, 20 // is not needed for some sort of requests, like non-main resource request,
24 // non-http request and more. 21 // non-http request and more.
25 return OfflinePageRequestJob::Create(profile_id_, request, network_delegate); 22 return OfflinePageRequestJob::Create(request, network_delegate);
26 } 23 }
27 24
28 } // namespace offline_pages 25 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698