forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WARN_UNUSED_RESULT to base::Time methods that return bool.
base::Time::FromString() and base::Time::FromUTCString() might fail at runtime on bad input. This adds a WARN_UNUSED_RESULT to their declarations to ensure that all callers properly handle the result. Apart from unit-tests, this changes two things: - DataUseTracker::RemoveExpiredEntriesForPref() will also remove any entries with an invalid date string. This doesn't change the runtime behaviour though, because a failure in base::Time::FromUTCString() would keep the local |key_date| variable to 0, which would have been considered too old anyway. - VariationsSeedStore::ImportFirstRunJavaSeed() has a new failure mode triggered by an invalid response date |FIRST_RUN_SEED_IMPORT_FAIL_INVALID_RESPONSE_DATE| It looks like the FirstRunResult enum values are only used on Android to report UMA metrics, so ensure that the new constant is added at the end of the list to avoid generating confusing histograms. - PexeDownloader::didReceiveResponse() still ignores invalid HTTP response 'last-modified' header dates. As with RemoveExpiredEntriesForPref() this doesn't change the runtime behaviour, but it is hard to see whether this is desirable or dangerous. - ConvertRequestValueToFileInfo() still ignores invalid date strings, as mentioned by the comment above the base::Time::FromString() line. BUG=669625 Review-Url: https://codereview.chromium.org/2605293002 Cr-Commit-Position: refs/heads/master@{#443353}
- Loading branch information
digit
authored and
Commit bot
committed
Jan 12, 2017
1 parent
9020aee
commit 2c8eed3
Showing
12 changed files
with
45 additions
and
26 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