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

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

Issue 10836248: Turned job_factory into a pure virtual class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed includes Created 8 years, 4 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 | Annotate | Revision Log
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 "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 15 matching lines...) Expand all
26 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
27 #include "chrome/common/pref_names.h" 27 #include "chrome/common/pref_names.h"
28 #include "chrome/common/url_constants.h" 28 #include "chrome/common/url_constants.h"
29 #include "content/public/browser/browser_thread.h" 29 #include "content/public/browser/browser_thread.h"
30 #include "content/public/browser/notification_service.h" 30 #include "content/public/browser/notification_service.h"
31 #include "content/public/browser/resource_context.h" 31 #include "content/public/browser/resource_context.h"
32 #include "net/base/server_bound_cert_service.h" 32 #include "net/base/server_bound_cert_service.h"
33 #include "net/ftp/ftp_network_layer.h" 33 #include "net/ftp/ftp_network_layer.h"
34 #include "net/http/http_cache.h" 34 #include "net/http/http_cache.h"
35 #include "net/url_request/ftp_protocol_handler.h" 35 #include "net/url_request/ftp_protocol_handler.h"
36 #include "net/url_request/url_request_job_factory.h" 36 #include "net/url_request/url_request_job_factory_impl.h"
37 #include "webkit/quota/special_storage_policy.h" 37 #include "webkit/quota/special_storage_policy.h"
38 38
39 using content::BrowserThread; 39 using content::BrowserThread;
40 40
41 ProfileImplIOData::Handle::Handle(Profile* profile) 41 ProfileImplIOData::Handle::Handle(Profile* profile)
42 : io_data_(new ProfileImplIOData), 42 : io_data_(new ProfileImplIOData),
43 profile_(profile), 43 profile_(profile),
44 initialized_(false) { 44 initialized_(false) {
45 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 45 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
46 DCHECK(profile); 46 DCHECK(profile);
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 media_request_context_->set_http_transaction_factory(media_cache); 438 media_request_context_->set_http_transaction_factory(media_cache);
439 439
440 ftp_factory_.reset( 440 ftp_factory_.reset(
441 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get())); 441 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get()));
442 main_context->set_ftp_transaction_factory(ftp_factory_.get()); 442 main_context->set_ftp_transaction_factory(ftp_factory_.get());
443 media_request_context_->set_ftp_transaction_factory(ftp_factory_.get()); 443 media_request_context_->set_ftp_transaction_factory(ftp_factory_.get());
444 444
445 main_context->set_chrome_url_data_manager_backend( 445 main_context->set_chrome_url_data_manager_backend(
446 chrome_url_data_manager_backend()); 446 chrome_url_data_manager_backend());
447 447
448 main_job_factory_.reset(new net::URLRequestJobFactory); 448 main_job_factory_.reset(new net::URLRequestJobFactoryImpl);
449 media_request_job_factory_.reset(new net::URLRequestJobFactory); 449 media_request_job_factory_.reset(new net::URLRequestJobFactoryImpl);
450 extensions_job_factory_.reset(new net::URLRequestJobFactory); 450 extensions_job_factory_.reset(new net::URLRequestJobFactoryImpl);
451 451
452 net::URLRequestJobFactory* job_factories[3]; 452 net::URLRequestJobFactory* job_factories[3];
453 job_factories[0] = main_job_factory_.get(); 453 job_factories[0] = main_job_factory_.get();
454 job_factories[1] = media_request_job_factory_.get(); 454 job_factories[1] = media_request_job_factory_.get();
455 job_factories[2] = extensions_job_factory_.get(); 455 job_factories[2] = extensions_job_factory_.get();
456 456
457 net::FtpAuthCache* ftp_auth_caches[3]; 457 net::FtpAuthCache* ftp_auth_caches[3];
458 ftp_auth_caches[0] = main_context->ftp_auth_cache(); 458 ftp_auth_caches[0] = main_context->ftp_auth_cache();
459 ftp_auth_caches[1] = media_request_context_->ftp_auth_cache(); 459 ftp_auth_caches[1] = media_request_context_->ftp_auth_cache();
460 ftp_auth_caches[2] = extensions_context->ftp_auth_cache(); 460 ftp_auth_caches[2] = extensions_context->ftp_auth_cache();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( 582 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread(
583 base::Time time) { 583 base::Time time) {
584 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 584 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
585 LazyInitialize(); 585 LazyInitialize();
586 586
587 DCHECK(transport_security_state()); 587 DCHECK(transport_security_state());
588 transport_security_state()->DeleteSince(time); 588 transport_security_state()->DeleteSince(time);
589 DCHECK(http_server_properties_manager()); 589 DCHECK(http_server_properties_manager());
590 http_server_properties_manager()->Clear(); 590 http_server_properties_manager()->Clear();
591 } 591 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698