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

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: Latest merge Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19 matching lines...) Expand all
30 #include "chrome/common/pref_names.h" 30 #include "chrome/common/pref_names.h"
31 #include "chrome/common/url_constants.h" 31 #include "chrome/common/url_constants.h"
32 #include "content/public/browser/browser_thread.h" 32 #include "content/public/browser/browser_thread.h"
33 #include "content/public/browser/notification_service.h" 33 #include "content/public/browser/notification_service.h"
34 #include "content/public/browser/resource_context.h" 34 #include "content/public/browser/resource_context.h"
35 #include "net/base/server_bound_cert_service.h" 35 #include "net/base/server_bound_cert_service.h"
36 #include "net/ftp/ftp_network_layer.h" 36 #include "net/ftp/ftp_network_layer.h"
37 #include "net/http/http_cache.h" 37 #include "net/http/http_cache.h"
38 #include "net/url_request/file_protocol_handler.h" 38 #include "net/url_request/file_protocol_handler.h"
39 #include "net/url_request/ftp_protocol_handler.h" 39 #include "net/url_request/ftp_protocol_handler.h"
40 #include "net/url_request/url_request_job_factory.h" 40 #include "net/url_request/url_request_job_factory_impl.h"
41 #include "webkit/quota/special_storage_policy.h" 41 #include "webkit/quota/special_storage_policy.h"
42 42
43 using content::BrowserThread; 43 using content::BrowserThread;
44 44
45 ProfileImplIOData::Handle::Handle(Profile* profile) 45 ProfileImplIOData::Handle::Handle(Profile* profile)
46 : io_data_(new ProfileImplIOData), 46 : io_data_(new ProfileImplIOData),
47 profile_(profile), 47 profile_(profile),
48 initialized_(false) { 48 initialized_(false) {
49 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 49 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
50 DCHECK(profile); 50 DCHECK(profile);
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get())); 444 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get()));
445 main_context->set_ftp_transaction_factory(ftp_factory_.get()); 445 main_context->set_ftp_transaction_factory(ftp_factory_.get());
446 446
447 main_context->set_chrome_url_data_manager_backend( 447 main_context->set_chrome_url_data_manager_backend(
448 chrome_url_data_manager_backend()); 448 chrome_url_data_manager_backend());
449 449
450 // Create a media request context based on the main context, but using a 450 // Create a media request context based on the main context, but using a
451 // media cache. 451 // media cache.
452 media_request_context_.reset(InitializeMediaRequestContext(main_context, "")); 452 media_request_context_.reset(InitializeMediaRequestContext(main_context, ""));
453 453
454 main_job_factory_.reset(new net::URLRequestJobFactory); 454 main_job_factory_.reset(new net::URLRequestJobFactoryImpl);
455 media_request_job_factory_.reset(new net::URLRequestJobFactory); 455 media_request_job_factory_.reset(new net::URLRequestJobFactoryImpl);
456 extensions_job_factory_.reset(new net::URLRequestJobFactory); 456 extensions_job_factory_.reset(new net::URLRequestJobFactoryImpl);
457 457
458 int set_protocol = main_job_factory_->SetProtocolHandler( 458 int set_protocol = main_job_factory_->SetProtocolHandler(
459 chrome::kFileScheme, new net::FileProtocolHandler()); 459 chrome::kFileScheme, new net::FileProtocolHandler());
460 DCHECK(set_protocol); 460 DCHECK(set_protocol);
461 set_protocol = media_request_job_factory_->SetProtocolHandler( 461 set_protocol = media_request_job_factory_->SetProtocolHandler(
462 chrome::kFileScheme, new net::FileProtocolHandler()); 462 chrome::kFileScheme, new net::FileProtocolHandler());
463 DCHECK(set_protocol); 463 DCHECK(set_protocol);
464 // TODO(shalev): The extensions_job_factory has a NULL NetworkDelegate. 464 // TODO(shalev): The extensions_job_factory has a NULL NetworkDelegate.
465 // Without a network_delegate, this protocol handler will never 465 // Without a network_delegate, this protocol handler will never
466 // handle file: requests, but as a side effect it makes 466 // handle file: requests, but as a side effect it makes
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( 670 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread(
671 base::Time time) { 671 base::Time time) {
672 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 672 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
673 LazyInitialize(); 673 LazyInitialize();
674 674
675 DCHECK(transport_security_state()); 675 DCHECK(transport_security_state());
676 transport_security_state()->DeleteSince(time); 676 transport_security_state()->DeleteSince(time);
677 DCHECK(http_server_properties_manager()); 677 DCHECK(http_server_properties_manager());
678 http_server_properties_manager()->Clear(); 678 http_server_properties_manager()->Clear();
679 } 679 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698