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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // If true default protocol handlers will be removed if the OS level | 46 // If true default protocol handlers will be removed if the OS level |
47 // registration for a protocol is no longer Chrome. | 47 // registration for a protocol is no longer Chrome. |
48 bool ShouldRemoveHandlersNotInOS() { | 48 bool ShouldRemoveHandlersNotInOS() { |
49 #if defined(OS_LINUX) | 49 #if defined(OS_LINUX) |
50 // We don't do this on Linux as the OS registration there is not reliable, | 50 // We don't do this on Linux as the OS registration there is not reliable, |
51 // and Chrome OS doesn't have any notion of OS registration. | 51 // and Chrome OS doesn't have any notion of OS registration. |
52 // TODO(benwells): When Linux support is more reliable remove this | 52 // TODO(benwells): When Linux support is more reliable remove this |
53 // difference (http://crbug.com/88255). | 53 // difference (http://crbug.com/88255). |
54 return false; | 54 return false; |
55 #else | 55 #else |
56 return shell_integration::CanSetAsDefaultProtocolClient() != | 56 return shell_integration::GetDefaultWebClientSetPermission() != |
57 shell_integration::SET_DEFAULT_NOT_ALLOWED; | 57 shell_integration::SET_DEFAULT_NOT_ALLOWED; |
58 #endif | 58 #endif |
59 } | 59 } |
60 | 60 |
61 } // namespace | 61 } // namespace |
62 | 62 |
63 // IOThreadDelegate ------------------------------------------------------------ | 63 // IOThreadDelegate ------------------------------------------------------------ |
64 | 64 |
65 // IOThreadDelegate is an IO thread specific object. Access to the class should | 65 // IOThreadDelegate is an IO thread specific object. Access to the class should |
66 // all be done via the IO thread. The registry living on the UI thread makes | 66 // all be done via the IO thread. The registry living on the UI thread makes |
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 | 922 |
923 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 923 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
924 ProtocolHandlerRegistry::CreateJobInterceptorFactory() { | 924 ProtocolHandlerRegistry::CreateJobInterceptorFactory() { |
925 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 925 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
926 // this is always created on the UI thread (in profile_io's | 926 // this is always created on the UI thread (in profile_io's |
927 // InitializeOnUIThread. Any method calls must be done | 927 // InitializeOnUIThread. Any method calls must be done |
928 // on the IO thread (this is checked). | 928 // on the IO thread (this is checked). |
929 return scoped_ptr<JobInterceptorFactory>( | 929 return scoped_ptr<JobInterceptorFactory>( |
930 new JobInterceptorFactory(io_thread_delegate_.get())); | 930 new JobInterceptorFactory(io_thread_delegate_.get())); |
931 } | 931 } |
OLD | NEW |