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_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "content/public/browser/notification_service.h" | 53 #include "content/public/browser/notification_service.h" |
54 #include "content/public/browser/resource_context.h" | 54 #include "content/public/browser/resource_context.h" |
55 #include "net/base/server_bound_cert_service.h" | 55 #include "net/base/server_bound_cert_service.h" |
56 #include "net/cookies/canonical_cookie.h" | 56 #include "net/cookies/canonical_cookie.h" |
57 #include "net/cookies/cookie_monster.h" | 57 #include "net/cookies/cookie_monster.h" |
58 #include "net/http/http_transaction_factory.h" | 58 #include "net/http/http_transaction_factory.h" |
59 #include "net/http/http_util.h" | 59 #include "net/http/http_util.h" |
60 #include "net/proxy/proxy_config_service_fixed.h" | 60 #include "net/proxy/proxy_config_service_fixed.h" |
61 #include "net/proxy/proxy_script_fetcher_impl.h" | 61 #include "net/proxy/proxy_script_fetcher_impl.h" |
62 #include "net/proxy/proxy_service.h" | 62 #include "net/proxy/proxy_service.h" |
| 63 #include "net/url_request/data_protocol_handler.h" |
63 #include "net/url_request/url_request.h" | 64 #include "net/url_request/url_request.h" |
64 | 65 |
65 #if defined(OS_CHROMEOS) | 66 #if defined(OS_CHROMEOS) |
66 #include "chrome/browser/chromeos/cros_settings.h" | 67 #include "chrome/browser/chromeos/cros_settings.h" |
67 #include "chrome/browser/chromeos/cros_settings_names.h" | 68 #include "chrome/browser/chromeos/cros_settings_names.h" |
68 #include "chrome/browser/chromeos/gdata/gdata_protocol_handler.h" | 69 #include "chrome/browser/chromeos/gdata/gdata_protocol_handler.h" |
69 #include "chrome/browser/chromeos/gview_request_interceptor.h" | 70 #include "chrome/browser/chromeos/gview_request_interceptor.h" |
70 #include "chrome/browser/chromeos/proxy_config_service_impl.h" | 71 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
71 #endif // defined(OS_CHROMEOS) | 72 #endif // defined(OS_CHROMEOS) |
72 | 73 |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 DCHECK(set_protocol); | 542 DCHECK(set_protocol); |
542 set_protocol = job_factory->SetProtocolHandler( | 543 set_protocol = job_factory->SetProtocolHandler( |
543 chrome::kChromeUIScheme, | 544 chrome::kChromeUIScheme, |
544 ChromeURLDataManagerBackend::CreateProtocolHandler( | 545 ChromeURLDataManagerBackend::CreateProtocolHandler( |
545 chrome_url_data_manager_backend_.get())); | 546 chrome_url_data_manager_backend_.get())); |
546 DCHECK(set_protocol); | 547 DCHECK(set_protocol); |
547 set_protocol = job_factory->SetProtocolHandler( | 548 set_protocol = job_factory->SetProtocolHandler( |
548 chrome::kChromeDevToolsScheme, | 549 chrome::kChromeDevToolsScheme, |
549 CreateDevToolsProtocolHandler(chrome_url_data_manager_backend_.get())); | 550 CreateDevToolsProtocolHandler(chrome_url_data_manager_backend_.get())); |
550 DCHECK(set_protocol); | 551 DCHECK(set_protocol); |
| 552 set_protocol = job_factory->SetProtocolHandler( |
| 553 chrome::kDataScheme, new net::DataProtocolHandler()); |
| 554 DCHECK(set_protocol); |
551 #if defined(OS_CHROMEOS) | 555 #if defined(OS_CHROMEOS) |
552 if (!is_incognito()) { | 556 if (!is_incognito()) { |
553 set_protocol = job_factory->SetProtocolHandler( | 557 set_protocol = job_factory->SetProtocolHandler( |
554 chrome::kDriveScheme, new gdata::GDataProtocolHandler()); | 558 chrome::kDriveScheme, new gdata::GDataProtocolHandler()); |
555 DCHECK(set_protocol); | 559 DCHECK(set_protocol); |
556 } | 560 } |
557 #if !defined(GOOGLE_CHROME_BUILD) | 561 #if !defined(GOOGLE_CHROME_BUILD) |
558 // Install the GView request interceptor that will redirect requests | 562 // Install the GView request interceptor that will redirect requests |
559 // of compatible documents (PDF, etc) to the GView document viewer. | 563 // of compatible documents (PDF, etc) to the GView document viewer. |
560 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 564 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
(...skipping 22 matching lines...) Expand all Loading... |
583 } | 587 } |
584 | 588 |
585 void ProfileIOData::set_server_bound_cert_service( | 589 void ProfileIOData::set_server_bound_cert_service( |
586 net::ServerBoundCertService* server_bound_cert_service) const { | 590 net::ServerBoundCertService* server_bound_cert_service) const { |
587 server_bound_cert_service_.reset(server_bound_cert_service); | 591 server_bound_cert_service_.reset(server_bound_cert_service); |
588 } | 592 } |
589 | 593 |
590 void ProfileIOData::DestroyResourceContext() { | 594 void ProfileIOData::DestroyResourceContext() { |
591 resource_context_.reset(); | 595 resource_context_.reset(); |
592 } | 596 } |
OLD | NEW |