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

Side by Side 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: Fix ChromeOS unit-test 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/nacl/renderer/ppb_nacl_private.h" 5 #include "components/nacl/renderer/ppb_nacl_private.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 expected_content_length_ = response.expectedContentLength(); 1616 expected_content_length_ = response.expectedContentLength();
1617 1617
1618 // Defer loading after receiving headers. This is because we may already 1618 // Defer loading after receiving headers. This is because we may already
1619 // have a cached translated nexe, so check for that now. 1619 // have a cached translated nexe, so check for that now.
1620 url_loader_->setDefersLoading(true); 1620 url_loader_->setDefersLoading(true);
1621 1621
1622 std::string etag = response.httpHeaderField("etag").utf8(); 1622 std::string etag = response.httpHeaderField("etag").utf8();
1623 std::string last_modified = 1623 std::string last_modified =
1624 response.httpHeaderField("last-modified").utf8(); 1624 response.httpHeaderField("last-modified").utf8();
1625 base::Time last_modified_time; 1625 base::Time last_modified_time;
1626 base::Time::FromString(last_modified.c_str(), &last_modified_time); 1626 ignore_result(
1627 base::Time::FromString(last_modified.c_str(), &last_modified_time));
digit1 2017/01/03 15:29:13 note: I'm not sure this is the right thing to do h
1627 1628
1628 bool has_no_store_header = false; 1629 bool has_no_store_header = false;
1629 std::string cache_control = 1630 std::string cache_control =
1630 response.httpHeaderField("cache-control").utf8(); 1631 response.httpHeaderField("cache-control").utf8();
1631 1632
1632 for (const std::string& cur : base::SplitString( 1633 for (const std::string& cur : base::SplitString(
1633 cache_control, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) { 1634 cache_control, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
1634 if (base::ToLowerASCII(cur) == "no-store") 1635 if (base::ToLowerASCII(cur) == "no-store")
1635 has_no_store_header = true; 1636 has_no_store_header = true;
1636 } 1637 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 // Mark the request as requesting a PNaCl bitcode file, 1738 // Mark the request as requesting a PNaCl bitcode file,
1738 // so that component updater can detect this user action. 1739 // so that component updater can detect this user action.
1739 url_request.addHTTPHeaderField( 1740 url_request.addHTTPHeaderField(
1740 blink::WebString::fromUTF8("Accept"), 1741 blink::WebString::fromUTF8("Accept"),
1741 blink::WebString::fromUTF8("application/x-pnacl, */*")); 1742 blink::WebString::fromUTF8("application/x-pnacl, */*"));
1742 url_request.setRequestContext(blink::WebURLRequest::RequestContextObject); 1743 url_request.setRequestContext(blink::WebURLRequest::RequestContextObject);
1743 downloader->Load(url_request); 1744 downloader->Load(url_request);
1744 } 1745 }
1745 1746
1746 } // namespace nacl 1747 } // namespace nacl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698