-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[printing] Use uint32_t for a page number and counts
This CL is a follow-up CL of converting PrintHostMsg_DidGetPrintedPagesCount to mojo [1] and it updates the type for the page number and counts with uint32_t as it couldn't have a negative value. It keeps using int for JNI and dictionary values and uses 'base::checked_cast<int>' to convert uint to int. In order to make sure that the value is in the range to cast, this change also adds the maximum limit for the page number and counts and checks the value before passing it to JNI or dictionary. Given that the previous type is int, the maximum limit is std::numeric_limits<int>::max(). [1] https://crrev.com/c/2326857 Bug: 1008939 Change-Id: I5c86514be4e7d549f888c9623136078a3b0c88c4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2351580 Reviewed-by: Bo <[email protected]> Reviewed-by: Andrey Kosyakov <[email protected]> Reviewed-by: Kinuko Yasuda <[email protected]> Reviewed-by: Lei Zhang <[email protected]> Commit-Queue: Julie Kim <[email protected]> Cr-Commit-Position: refs/heads/master@{#807307} GitOrigin-RevId: fbf3f1850ace4f195f1e32c640c19fe9f32ab8e4
- Loading branch information
1 parent
97dbfc0
commit 8d1536b
Showing
15 changed files
with
61 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters