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

Unified Diff: chrome/browser/password_manager/password_store_mac.cc

Issue 2111103002: Make callers of FromUTC(Local)Exploded in chrome/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lei Zhang's comments Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/password_manager/password_store_mac.cc
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index 63dca04ff7d065131de170d116e784a6f6415846..fb82842ddcb1241f40a1abbf3b8419c4db70ac38 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -279,8 +279,7 @@ GURL URLFromComponents(bool is_secure, const std::string& host, int port,
}
// Converts a Keychain time string to a Time object, returning true if
-// time_string_bytes was parsable. If the return value is false, the value of
-// |time| is unchanged.
+// time_string_bytes was parsable.
bool TimeFromKeychainTimeString(const char* time_string_bytes,
unsigned int byte_length,
base::Time* time) {
@@ -298,11 +297,7 @@ bool TimeFromKeychainTimeString(const char* time_string_bytes,
&exploded_time.minute, &exploded_time.second);
free(time_string);
- if (assignments == 6) {
- *time = base::Time::FromUTCExploded(exploded_time);
- return true;
- }
- return false;
+ return assignments == 6 && base::Time::FromUTCExploded(exploded_time, time);
}
// Returns the PasswordForm Scheme corresponding to |auth_type|.

Powered by Google App Engine
This is Rietveld 408576698