OLD | NEW |
---|---|
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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 14 matching lines...) Expand all Loading... | |
25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
26 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
27 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
28 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
29 #include "content/public/browser/resource_context.h" | 29 #include "content/public/browser/resource_context.h" |
30 #include "net/base/server_bound_cert_service.h" | 30 #include "net/base/server_bound_cert_service.h" |
31 #include "net/ftp/ftp_network_layer.h" | 31 #include "net/ftp/ftp_network_layer.h" |
32 #include "net/http/http_cache.h" | 32 #include "net/http/http_cache.h" |
33 #include "net/url_request/url_request_job_factory.h" | 33 #include "net/url_request/url_request_job_factory.h" |
34 #include "webkit/quota/special_storage_policy.h" | 34 #include "webkit/quota/special_storage_policy.h" |
35 #include "net/url_request/url_request_ftp_job.h" | |
erikwright (departed)
2012/06/07 19:14:51
Probably don't need url_request_ftp_job.h anymore.
shalev
2012/06/21 20:04:55
Done.
shalev
2012/06/21 20:04:55
Done.
| |
36 #include "net/ftp/ftp_auth_cache.h" | |
37 #include "net/url_request/ftp_protocol_handler.h" | |
Paweł Hajdan Jr.
2012/06/07 19:30:21
nit: Hey, keep the headers sorted!
1. #include ne
shalev
2012/06/21 20:04:55
Done.
| |
35 | 38 |
36 using content::BrowserThread; | 39 using content::BrowserThread; |
37 | 40 |
38 ProfileImplIOData::Handle::Handle(Profile* profile) | 41 ProfileImplIOData::Handle::Handle(Profile* profile) |
39 : io_data_(new ProfileImplIOData), | 42 : io_data_(new ProfileImplIOData), |
40 profile_(profile), | 43 profile_(profile), |
41 initialized_(false) { | 44 initialized_(false) { |
42 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 45 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
43 DCHECK(profile); | 46 DCHECK(profile); |
44 } | 47 } |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
443 main_context->set_ftp_transaction_factory(ftp_factory_.get()); | 446 main_context->set_ftp_transaction_factory(ftp_factory_.get()); |
444 media_request_context_->set_ftp_transaction_factory(ftp_factory_.get()); | 447 media_request_context_->set_ftp_transaction_factory(ftp_factory_.get()); |
445 | 448 |
446 main_context->set_chrome_url_data_manager_backend( | 449 main_context->set_chrome_url_data_manager_backend( |
447 chrome_url_data_manager_backend()); | 450 chrome_url_data_manager_backend()); |
448 | 451 |
449 main_context->set_job_factory(job_factory()); | 452 main_context->set_job_factory(job_factory()); |
450 media_request_context_->set_job_factory(job_factory()); | 453 media_request_context_->set_job_factory(job_factory()); |
451 extensions_context->set_job_factory(job_factory()); | 454 extensions_context->set_job_factory(job_factory()); |
452 | 455 |
456 job_factory()->SetProtocolHandler(chrome::kFtpScheme, | |
457 new net::FtpProtocolHandler( | |
458 network_delegate(), ftp_factory_.get(), new net::FtpAuthCache)); | |
459 | |
453 job_factory()->AddInterceptor( | 460 job_factory()->AddInterceptor( |
454 new chrome_browser_net::ConnectInterceptor(predictor_.get())); | 461 new chrome_browser_net::ConnectInterceptor(predictor_.get())); |
455 | 462 |
456 lazy_params_.reset(); | 463 lazy_params_.reset(); |
457 } | 464 } |
458 | 465 |
459 ChromeURLRequestContext* | 466 ChromeURLRequestContext* |
460 ProfileImplIOData::InitializeAppRequestContext( | 467 ProfileImplIOData::InitializeAppRequestContext( |
461 ChromeURLRequestContext* main_context, | 468 ChromeURLRequestContext* main_context, |
462 const std::string& app_id) const { | 469 const std::string& app_id) const { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
538 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( | 545 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( |
539 base::Time time) { | 546 base::Time time) { |
540 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 547 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
541 LazyInitialize(); | 548 LazyInitialize(); |
542 | 549 |
543 DCHECK(transport_security_state()); | 550 DCHECK(transport_security_state()); |
544 transport_security_state()->DeleteSince(time); | 551 transport_security_state()->DeleteSince(time); |
545 DCHECK(http_server_properties_manager()); | 552 DCHECK(http_server_properties_manager()); |
546 http_server_properties_manager()->Clear(); | 553 http_server_properties_manager()->Clear(); |
547 } | 554 } |
OLD | NEW |