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 "base/prefs/pref_service.h" |
13 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
14 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg
ate.h" | 14 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg
ate.h" |
15 #include "chrome/browser/net/chrome_url_request_context.h" | 15 #include "chrome/browser/net/chrome_url_request_context.h" |
16 #include "chrome/browser/profiles/profile_io_data.h" | 16 #include "chrome/browser/profiles/profile_io_data.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/common/custom_handlers/protocol_handler.h" | 18 #include "chrome/common/custom_handlers/protocol_handler.h" |
19 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
20 #include "components/user_prefs/pref_registry_syncable.h" | 20 #include "components/pref_registry/pref_registry_syncable.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" |
26 | 26 |
27 using content::BrowserThread; | 27 using content::BrowserThread; |
28 using content::ChildProcessSecurityPolicy; | 28 using content::ChildProcessSecurityPolicy; |
29 | 29 |
30 namespace { | 30 namespace { |
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 | 878 |
879 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 879 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
880 ProtocolHandlerRegistry::CreateJobInterceptorFactory() { | 880 ProtocolHandlerRegistry::CreateJobInterceptorFactory() { |
881 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 881 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
882 // this is always created on the UI thread (in profile_io's | 882 // this is always created on the UI thread (in profile_io's |
883 // InitializeOnUIThread. Any method calls must be done | 883 // InitializeOnUIThread. Any method calls must be done |
884 // on the IO thread (this is checked). | 884 // on the IO thread (this is checked). |
885 return scoped_ptr<JobInterceptorFactory>( | 885 return scoped_ptr<JobInterceptorFactory>( |
886 new JobInterceptorFactory(io_thread_delegate_.get())); | 886 new JobInterceptorFactory(io_thread_delegate_.get())); |
887 } | 887 } |
OLD | NEW |