| 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" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 if (worker_) { | 236 if (worker_) { |
| 237 if (ShouldRemoveHandlersNotInOS() && | 237 if (ShouldRemoveHandlersNotInOS() && |
| 238 (state == ShellIntegration::STATE_NOT_DEFAULT)) { | 238 (state == ShellIntegration::STATE_NOT_DEFAULT)) { |
| 239 registry_->ClearDefault(worker_->protocol()); | 239 registry_->ClearDefault(worker_->protocol()); |
| 240 } | 240 } |
| 241 } else { | 241 } else { |
| 242 NOTREACHED(); | 242 NOTREACHED(); |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 | 245 |
| 246 bool ProtocolHandlerRegistry::DefaultClientObserver:: |
| 247 IsInteractiveSetDefaultPermitted() { |
| 248 return true; |
| 249 } |
| 250 |
| 246 void ProtocolHandlerRegistry::DefaultClientObserver::SetWorker( | 251 void ProtocolHandlerRegistry::DefaultClientObserver::SetWorker( |
| 247 ShellIntegration::DefaultProtocolClientWorker* worker) { | 252 ShellIntegration::DefaultProtocolClientWorker* worker) { |
| 248 worker_ = worker; | 253 worker_ = worker; |
| 249 } | 254 } |
| 250 | 255 |
| 251 bool ProtocolHandlerRegistry::DefaultClientObserver::IsOwnedByWorker() { | 256 bool ProtocolHandlerRegistry::DefaultClientObserver::IsOwnedByWorker() { |
| 252 return true; | 257 return true; |
| 253 } | 258 } |
| 254 | 259 |
| 255 // Delegate -------------------------------------------------------------------- | 260 // Delegate -------------------------------------------------------------------- |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 } | 874 } |
| 870 | 875 |
| 871 net::URLRequestJobFactory::Interceptor* | 876 net::URLRequestJobFactory::Interceptor* |
| 872 ProtocolHandlerRegistry::CreateURLInterceptor() { | 877 ProtocolHandlerRegistry::CreateURLInterceptor() { |
| 873 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 878 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 874 // this is always created on the UI thread (in profile_io's | 879 // this is always created on the UI thread (in profile_io's |
| 875 // InitializeOnUIThread. Any method calls must be done | 880 // InitializeOnUIThread. Any method calls must be done |
| 876 // on the IO thread (this is checked). | 881 // on the IO thread (this is checked). |
| 877 return new URLInterceptor(core_); | 882 return new URLInterceptor(core_); |
| 878 } | 883 } |
| OLD | NEW |