| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_H_ | 5 #ifndef CHROME_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_H_ |
| 6 #define CHROME_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_H_ | 6 #define CHROME_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 DictionaryValue* Encode() const; | 47 DictionaryValue* Encode() const; |
| 48 | 48 |
| 49 const std::string& protocol() const { return protocol_; } | 49 const std::string& protocol() const { return protocol_; } |
| 50 const GURL& url() const { return url_;} | 50 const GURL& url() const { return url_;} |
| 51 const string16& title() const { return title_; } | 51 const string16& title() const { return title_; } |
| 52 | 52 |
| 53 bool IsEmpty() const { | 53 bool IsEmpty() const { |
| 54 return protocol_.empty(); | 54 return protocol_.empty(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 #if !defined(NDEBUG) |
| 58 // Returns a string representation suitable for use in debugging. |
| 59 std::string ToString() const; |
| 60 #endif |
| 61 |
| 62 |
| 57 bool operator==(const ProtocolHandler& other) const; | 63 bool operator==(const ProtocolHandler& other) const; |
| 58 bool operator<(const ProtocolHandler& other) const; | 64 bool operator<(const ProtocolHandler& other) const; |
| 59 | 65 |
| 60 private: | 66 private: |
| 61 ProtocolHandler(const std::string& protocol, | 67 ProtocolHandler(const std::string& protocol, |
| 62 const GURL& url, | 68 const GURL& url, |
| 63 const string16& title); | 69 const string16& title); |
| 64 ProtocolHandler(); | 70 ProtocolHandler(); |
| 65 | 71 |
| 66 std::string protocol_; | 72 std::string protocol_; |
| 67 GURL url_; | 73 GURL url_; |
| 68 string16 title_; | 74 string16 title_; |
| 69 }; | 75 }; |
| 70 | 76 |
| 71 #endif // CHROME_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_H_ | 77 #endif // CHROME_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_H_ |
| OLD | NEW |