Chromium Code Reviews| 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 std::string ToString() const; | |
|
Peter Kasting
2012/06/22 22:10:06
Nit: Consider a comment about why we have this.
A
Steve McKay
2012/06/22 22:40:01
Added a comment.
Basically I pulled this out of a
| |
| 58 | |
| 57 bool operator==(const ProtocolHandler& other) const; | 59 bool operator==(const ProtocolHandler& other) const; |
| 58 bool operator<(const ProtocolHandler& other) const; | 60 bool operator<(const ProtocolHandler& other) const; |
| 59 | 61 |
| 60 private: | 62 private: |
| 61 ProtocolHandler(const std::string& protocol, | 63 ProtocolHandler(const std::string& protocol, |
| 62 const GURL& url, | 64 const GURL& url, |
| 63 const string16& title); | 65 const string16& title); |
| 64 ProtocolHandler(); | 66 ProtocolHandler(); |
| 65 | 67 |
| 66 std::string protocol_; | 68 std::string protocol_; |
| 67 GURL url_; | 69 GURL url_; |
| 68 string16 title_; | 70 string16 title_; |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 #endif // CHROME_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_H_ | 73 #endif // CHROME_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_H_ |
| OLD | NEW |