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

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 2388253002: Use the previews black list for offline previews (Closed)
Patch Set: jianli comment 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/profiles/profile_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get())); 542 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get()));
543 #endif // !defined(DISABLE_FTP_SUPPORT) 543 #endif // !defined(DISABLE_FTP_SUPPORT)
544 544
545 std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory( 545 std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory(
546 new net::URLRequestJobFactoryImpl()); 546 new net::URLRequestJobFactoryImpl());
547 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); 547 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers);
548 548
549 // Install the Offline Page Interceptor. 549 // Install the Offline Page Interceptor.
550 #if defined(OS_ANDROID) 550 #if defined(OS_ANDROID)
551 request_interceptors.push_back(std::unique_ptr<net::URLRequestInterceptor>( 551 request_interceptors.push_back(std::unique_ptr<net::URLRequestInterceptor>(
552 new offline_pages::OfflinePageRequestInterceptor())); 552 new offline_pages::OfflinePageRequestInterceptor(
553 previews_io_data()->PreviewsDeciderWeakPtr())));
tbansal1 2016/10/06 14:51:04 Is there a guarantee that previews decider will ou
mmenke 2016/10/06 15:02:46 +1 to not exposing a WeakPtr this way. Can we pas
RyanSturm 2016/10/06 15:52:16 The PreviewsIOData is used in more places than jus
553 #endif 554 #endif
554 555
555 // The data reduction proxy interceptor should be as close to the network 556 // The data reduction proxy interceptor should be as close to the network
556 // as possible. 557 // as possible.
557 request_interceptors.insert( 558 request_interceptors.insert(
558 request_interceptors.begin(), 559 request_interceptors.begin(),
559 data_reduction_proxy_io_data()->CreateInterceptor().release()); 560 data_reduction_proxy_io_data()->CreateInterceptor().release());
560 main_job_factory_ = SetUpJobFactoryDefaults( 561 main_job_factory_ = SetUpJobFactoryDefaults(
561 std::move(main_job_factory), std::move(request_interceptors), 562 std::move(main_job_factory), std::move(request_interceptors),
562 std::move(profile_params->protocol_handler_interceptor), 563 std::move(profile_params->protocol_handler_interceptor),
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 const base::Closure& completion) { 808 const base::Closure& completion) {
808 DCHECK_CURRENTLY_ON(BrowserThread::IO); 809 DCHECK_CURRENTLY_ON(BrowserThread::IO);
809 DCHECK(initialized()); 810 DCHECK(initialized());
810 811
811 DCHECK(transport_security_state()); 812 DCHECK(transport_security_state());
812 // Completes synchronously. 813 // Completes synchronously.
813 transport_security_state()->DeleteAllDynamicDataSince(time); 814 transport_security_state()->DeleteAllDynamicDataSince(time);
814 DCHECK(http_server_properties_manager_); 815 DCHECK(http_server_properties_manager_);
815 http_server_properties_manager_->Clear(completion); 816 http_server_properties_manager_->Clear(completion);
816 } 817 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698