Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: chrome/common/custom_handlers/protocol_handler.h

Issue 10559049: Add ToString method for easy DLOG and debug support (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Respond to review comments. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/common/custom_handlers/protocol_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/common/custom_handlers/protocol_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698