| 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/custom_handlers/protocol_handler_registry.h" | 5 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/prefs/pref_service.h" |
| 12 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg
ate.h" | 13 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg
ate.h" |
| 13 #include "chrome/browser/net/chrome_url_request_context.h" | 14 #include "chrome/browser/net/chrome_url_request_context.h" |
| 14 #include "chrome/browser/prefs/pref_registry_syncable.h" | 15 #include "chrome/browser/prefs/pref_registry_syncable.h" |
| 15 #include "chrome/browser/prefs/pref_service.h" | |
| 16 #include "chrome/browser/profiles/profile_io_data.h" | 16 #include "chrome/browser/profiles/profile_io_data.h" |
| 17 #include "chrome/common/chrome_notification_types.h" | 17 #include "chrome/common/chrome_notification_types.h" |
| 18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
| 19 #include "chrome/common/custom_handlers/protocol_handler.h" | 19 #include "chrome/common/custom_handlers/protocol_handler.h" |
| 20 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 21 #include "content/public/browser/child_process_security_policy.h" | 21 #include "content/public/browser/child_process_security_policy.h" |
| 22 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
| 23 #include "net/base/network_delegate.h" | 23 #include "net/base/network_delegate.h" |
| 24 #include "net/url_request/url_request_redirect_job.h" | 24 #include "net/url_request/url_request_redirect_job.h" |
| 25 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 | 901 |
| 902 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 902 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 903 ProtocolHandlerRegistry::CreateJobInterceptorFactory() { | 903 ProtocolHandlerRegistry::CreateJobInterceptorFactory() { |
| 904 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 904 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 905 // this is always created on the UI thread (in profile_io's | 905 // this is always created on the UI thread (in profile_io's |
| 906 // InitializeOnUIThread. Any method calls must be done | 906 // InitializeOnUIThread. Any method calls must be done |
| 907 // on the IO thread (this is checked). | 907 // on the IO thread (this is checked). |
| 908 return scoped_ptr<JobInterceptorFactory>(new JobInterceptorFactory( | 908 return scoped_ptr<JobInterceptorFactory>(new JobInterceptorFactory( |
| 909 io_thread_delegate_)); | 909 io_thread_delegate_)); |
| 910 } | 910 } |
| OLD | NEW |