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

Side by Side Diff: chrome/common/spellcheck_marker.h

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « chrome/common/spellcheck_common.h ('k') | chrome/common/spellcheck_messages.h » ('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) 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>
9 #include <stdint.h>
10
8 class SpellCheckMarker { 11 class SpellCheckMarker {
9 public: 12 public:
10 // A predicate to test spellcheck marker validity. 13 // A predicate to test spellcheck marker validity.
11 class IsValidPredicate { 14 class IsValidPredicate {
12 public: 15 public:
13 typedef SpellCheckMarker argument_type; 16 typedef SpellCheckMarker argument_type;
14 explicit IsValidPredicate(size_t text_length) : text_length_(text_length) {} 17 explicit IsValidPredicate(size_t text_length) : text_length_(text_length) {}
15 bool operator()(const SpellCheckMarker& marker) const { 18 bool operator()(const SpellCheckMarker& marker) const {
16 return marker.offset < text_length_; 19 return marker.offset < text_length_;
17 } 20 }
18 private: 21 private:
19 size_t text_length_; 22 size_t text_length_;
20 }; 23 };
21 24
22 // IPC requires a default constructor. 25 // IPC requires a default constructor.
23 SpellCheckMarker() : hash(0xFFFFFFFF), offset(static_cast<size_t>(-1)) {} 26 SpellCheckMarker() : hash(0xFFFFFFFF), offset(static_cast<size_t>(-1)) {}
24 27
25 SpellCheckMarker(uint32 hash, size_t offset) : hash(hash), offset(offset) {} 28 SpellCheckMarker(uint32_t hash, size_t offset) : hash(hash), offset(offset) {}
26 29
27 uint32 hash; 30 uint32_t hash;
28 size_t offset; 31 size_t offset;
29 }; 32 };
30 33
31 #endif // CHROME_COMMON_SPELLCHECK_MARKER_H_ 34 #endif // CHROME_COMMON_SPELLCHECK_MARKER_H_
OLDNEW
« no previous file with comments | « chrome/common/spellcheck_common.h ('k') | chrome/common/spellcheck_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698