| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_SPELLCHECK_MARKER_H_ | 5 #ifndef CHROME_COMMON_SPELLCHECK_MARKER_H_ |
| 6 #define CHROME_COMMON_SPELLCHECK_MARKER_H_ | 6 #define CHROME_COMMON_SPELLCHECK_MARKER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 size_t text_length_; | 22 size_t text_length_; |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 // IPC requires a default constructor. | 25 // IPC requires a default constructor. |
| 26 SpellCheckMarker() : hash(0xFFFFFFFF), offset(UINT32_MAX) {} | 26 SpellCheckMarker() : hash(0xFFFFFFFF), offset(UINT32_MAX) {} |
| 27 | 27 |
| 28 SpellCheckMarker(uint32_t hash, uint32_t offset) | 28 SpellCheckMarker(uint32_t hash, uint32_t offset) |
| 29 : hash(hash), offset(offset) {} | 29 : hash(hash), offset(offset) {} |
| 30 | 30 |
| 31 uint32_t hash; | 31 uint32_t hash; |
| 32 // Note: we use uint32_t instead of size_t because this struct is sent over |
| 33 // IPC which could span 32 & 64 bit processes. This is fine since the offset |
| 34 // shouldn't exceed UINT32_MAX even on 64 bit builds. |
| 32 uint32_t offset; | 35 uint32_t offset; |
| 33 }; | 36 }; |
| 34 | 37 |
| 35 #endif // CHROME_COMMON_SPELLCHECK_MARKER_H_ | 38 #endif // CHROME_COMMON_SPELLCHECK_MARKER_H_ |
| OLD | NEW |