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

Unified Diff: chromecast/crash/linux/crash_testing_utils.cc

Issue 2203123003: [Chromecast] Remove usage of nonreentrant functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: slan@ comments Created 4 years, 4 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
« no previous file with comments | « chromecast/crash/linux/crash_testing_utils.h ('k') | chromecast/crash/linux/crash_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/crash/linux/crash_testing_utils.cc
diff --git a/chromecast/crash/linux/crash_testing_utils.cc b/chromecast/crash/linux/crash_testing_utils.cc
index 19aed15178fc3aa4b0d86e5471d15dd259b8663e..5dfdab20269a3e4a12709d8195e6cb6613f3c5d2 100644
--- a/chromecast/crash/linux/crash_testing_utils.cc
+++ b/chromecast/crash/linux/crash_testing_utils.cc
@@ -143,7 +143,8 @@ bool AppendLockFile(const std::string& lockfile_path,
return WriteLockFile(lockfile_path, contents.get()) == 0;
}
-bool SetRatelimitPeriodStart(const std::string& metadata_path, time_t start) {
+bool SetRatelimitPeriodStart(const std::string& metadata_path,
+ const base::Time& start) {
std::unique_ptr<base::Value> contents = ParseMetadataFile(metadata_path);
base::DictionaryValue* dict;
@@ -153,10 +154,7 @@ bool SetRatelimitPeriodStart(const std::string& metadata_path, time_t start) {
return false;
}
- std::string period_start_str =
- base::StringPrintf("%lld", static_cast<long long>(start));
- ratelimit_params->SetString(kRatelimitPeriodStartKey, period_start_str);
-
+ ratelimit_params->SetDouble(kRatelimitPeriodStartKey, start.ToDoubleT());
return WriteMetadataFile(metadata_path, contents.get()) == 0;
}
« no previous file with comments | « chromecast/crash/linux/crash_testing_utils.h ('k') | chromecast/crash/linux/crash_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698