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

Unified Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 2605293002: Add WARN_UNUSED_RESULT to base::Time methods that return bool. (Closed)
Patch Set: Add comment to PexeDownloader::didReceiveResponse() Created 3 years, 11 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: components/nacl/renderer/ppb_nacl_private_impl.cc
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc
index d39b2b701e22b1567a8ed474a2c7ae06e1e05e7a..5a1dcdbbf81945f25fc38492d92bfa3e436b804d 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -1620,10 +1620,16 @@ class PexeDownloader : public blink::WebAssociatedURLLoaderClient {
url_loader_->setDefersLoading(true);
std::string etag = response.httpHeaderField("etag").utf8();
+
+ // Parse the "last-modified" date string. An invalid string will result
+ // in a base::Time value of 0, which is supported by the only user of
+ // the |CacheInfo::last_modified| field (see
+ // pnacl::PnaclTranslationCache::GetKey()).
std::string last_modified =
response.httpHeaderField("last-modified").utf8();
base::Time last_modified_time;
- base::Time::FromString(last_modified.c_str(), &last_modified_time);
+ ignore_result(
+ base::Time::FromString(last_modified.c_str(), &last_modified_time));
bool has_no_store_header = false;
std::string cache_control =

Powered by Google App Engine
This is Rietveld 408576698