Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
| 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 // registry. | 194 // registry. |
| 195 void GetRegisteredProtocols(std::vector<std::string>* output) const; | 195 void GetRegisteredProtocols(std::vector<std::string>* output) const; |
| 196 | 196 |
| 197 // Returns true if we allow websites to register handlers for the given | 197 // Returns true if we allow websites to register handlers for the given |
| 198 // scheme. | 198 // scheme. |
| 199 bool CanSchemeBeOverridden(const std::string& scheme) const; | 199 bool CanSchemeBeOverridden(const std::string& scheme) const; |
| 200 | 200 |
| 201 // Returns true if an identical protocol handler has already been registered. | 201 // Returns true if an identical protocol handler has already been registered. |
| 202 bool IsRegistered(const ProtocolHandler& handler) const; | 202 bool IsRegistered(const ProtocolHandler& handler) const; |
| 203 | 203 |
| 204 // Returns true if an identical protocol handler has already been registered | |
| 205 // by user. | |
|
bartfab (slow)
2014/09/01 14:56:43
Nit: s/user/the user/
kaliamoorthi
2014/09/01 15:11:58
Done.
| |
| 206 bool IsRegisteredByUser(const ProtocolHandler& handler); | |
| 207 | |
| 208 // Returns true, if the scheme has at-least one handler that is registered by | |
|
bartfab (slow)
2014/09/01 14:56:43
Nit 1: s/,//
Nit 2: s/at-least/at least/
kaliamoorthi
2014/09/01 15:11:58
Done.
| |
| 209 // policy. | |
| 210 bool HasPolicyRegisteredHandler(const std::string& scheme); | |
| 211 | |
| 204 // Returns true if an identical protocol handler is being ignored. | 212 // Returns true if an identical protocol handler is being ignored. |
| 205 bool IsIgnored(const ProtocolHandler& handler) const; | 213 bool IsIgnored(const ProtocolHandler& handler) const; |
| 206 | 214 |
| 207 // Returns true if an equivalent protocol handler has already been registered. | 215 // Returns true if an equivalent protocol handler has already been registered. |
| 208 bool HasRegisteredEquivalent(const ProtocolHandler& handler) const; | 216 bool HasRegisteredEquivalent(const ProtocolHandler& handler) const; |
| 209 | 217 |
| 210 // Returns true if an equivalent protocol handler is being ignored. | 218 // Returns true if an equivalent protocol handler is being ignored. |
| 211 bool HasIgnoredEquivalent(const ProtocolHandler& handler) const; | 219 bool HasIgnoredEquivalent(const ProtocolHandler& handler) const; |
| 212 | 220 |
| 213 // Causes the given protocol handler to not be ignored anymore. | 221 // Causes the given protocol handler to not be ignored anymore. |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 368 | 376 |
| 369 // Copy of registry data for use on the IO thread. Changes to the registry | 377 // Copy of registry data for use on the IO thread. Changes to the registry |
| 370 // are posted to the IO thread where updates are applied to this object. | 378 // are posted to the IO thread where updates are applied to this object. |
| 371 scoped_refptr<IOThreadDelegate> io_thread_delegate_; | 379 scoped_refptr<IOThreadDelegate> io_thread_delegate_; |
| 372 | 380 |
| 373 DefaultClientObserverList default_client_observers_; | 381 DefaultClientObserverList default_client_observers_; |
| 374 | 382 |
| 375 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); | 383 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); |
| 376 }; | 384 }; |
| 377 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 385 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
| OLD | NEW |