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

Side by Side Diff: ui/gfx/range/range.h

Issue 1684793003: Add comments for struct members that were changed from size_t to uin32_t or uint64_t for IPC safety. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « media/cast/sender/frame_sender.cc ('k') | no next file » | 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) 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 UI_GFX_RANGE_RANGE_H_ 5 #ifndef UI_GFX_RANGE_RANGE_H_
6 #define UI_GFX_RANGE_RANGE_H_ 6 #define UI_GFX_RANGE_RANGE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // is_reversed(), the range will get flipped when converted to an NSRange. 101 // is_reversed(), the range will get flipped when converted to an NSRange.
102 NSRange ToNSRange() const; 102 NSRange ToNSRange() const;
103 #elif defined(OS_WIN) 103 #elif defined(OS_WIN)
104 CHARRANGE ToCHARRANGE() const; 104 CHARRANGE ToCHARRANGE() const;
105 #endif 105 #endif
106 // GTK+ has no concept of a range. 106 // GTK+ has no concept of a range.
107 107
108 std::string ToString() const; 108 std::string ToString() const;
109 109
110 private: 110 private:
111 // Note: we use uint32_t instead of size_t because this struct is sent over
112 // IPC which could span 32 & 64 bit processes. This is fine since text spans
113 // shouldn't exceed UINT32_MAX even on 64 bit builds.
111 uint32_t start_; 114 uint32_t start_;
112 uint32_t end_; 115 uint32_t end_;
113 }; 116 };
114 117
115 GFX_EXPORT std::ostream& operator<<(std::ostream& os, const Range& range); 118 GFX_EXPORT std::ostream& operator<<(std::ostream& os, const Range& range);
116 119
117 } // namespace gfx 120 } // namespace gfx
118 121
119 #endif // UI_GFX_RANGE_RANGE_H_ 122 #endif // UI_GFX_RANGE_RANGE_H_
OLDNEW
« no previous file with comments | « media/cast/sender/frame_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698