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

Unified Diff: chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc

Issue 295933002: [fsp] Do not crash on an invalid modification time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 7 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 | « no previous file | chrome/test/data/extensions/api_test/file_system_provider/get_metadata/test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc
diff --git a/chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc b/chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc
index 809351a55bba49e3d8ace3440863deda3994f89c..01e7434a672d67c9e5c5062a9ab16ee248cdc956 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc
@@ -34,10 +34,11 @@ bool ConvertRequestValueToFileInfo(scoped_ptr<RequestValue> value,
"value", &input_modification_time)) {
return false;
}
- if (!base::Time::FromString(input_modification_time.c_str(),
- &output->last_modified)) {
- return false;
- }
+
+ // Allow to pass invalid modification time, since there is no way to verify
+ // it easily on any earlier stage.
+ base::Time::FromString(
+ input_modification_time.c_str(), &output->last_modified);
return true;
}
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/file_system_provider/get_metadata/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698