| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 worker_->ObserverDestroyed(); | 71 worker_->ObserverDestroyed(); |
| 72 | 72 |
| 73 DefaultClientObserverList::iterator iter = std::find( | 73 DefaultClientObserverList::iterator iter = std::find( |
| 74 registry_->default_client_observers_.begin(), | 74 registry_->default_client_observers_.begin(), |
| 75 registry_->default_client_observers_.end(), this); | 75 registry_->default_client_observers_.end(), this); |
| 76 registry_->default_client_observers_.erase(iter); | 76 registry_->default_client_observers_.erase(iter); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void | 79 void |
| 80 ProtocolHandlerRegistry::DefaultClientObserver::SetDefaultWebClientUIState( | 80 ProtocolHandlerRegistry::DefaultClientObserver::SetDefaultWebClientUIState( |
| 81 ShellIntegration::DefaultWebClientUIState state) { | 81 ShellIntegration::DefaultWebClientUIState state, |
| 82 ShellIntegration::SetDefaultWebClientResult unused_result) { |
| 82 if (worker_) { | 83 if (worker_) { |
| 83 if (ShouldRemoveHandlersNotInOS() && | 84 if (ShouldRemoveHandlersNotInOS() && |
| 84 (state == ShellIntegration::STATE_NOT_DEFAULT)) { | 85 (state == ShellIntegration::STATE_NOT_DEFAULT)) { |
| 85 registry_->ClearDefault(worker_->protocol()); | 86 registry_->ClearDefault(worker_->protocol()); |
| 86 } | 87 } |
| 87 } else { | 88 } else { |
| 88 NOTREACHED(); | 89 NOTREACHED(); |
| 89 } | 90 } |
| 90 } | 91 } |
| 91 | 92 |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 | 716 |
| 716 void ProtocolHandlerRegistry::AddPredefinedHandler( | 717 void ProtocolHandlerRegistry::AddPredefinedHandler( |
| 717 const ProtocolHandler& handler) { | 718 const ProtocolHandler& handler) { |
| 718 // If called after the load command was issued this function will fail. | 719 // If called after the load command was issued this function will fail. |
| 719 DCHECK(!is_loaded_); | 720 DCHECK(!is_loaded_); |
| 720 RegisterProtocolHandler(handler); | 721 RegisterProtocolHandler(handler); |
| 721 SetDefault(handler); | 722 SetDefault(handler); |
| 722 } | 723 } |
| 723 | 724 |
| 724 | 725 |
| OLD | NEW |