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

Side by Side Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 1234973004: Update SplitString calls in components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 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 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_impl.h" 5 #include "components/nacl/renderer/ppb_nacl_private_impl.h"
6 6
7 #include <numeric> 7 #include <numeric>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 std::string etag = response.httpHeaderField("etag").utf8(); 1550 std::string etag = response.httpHeaderField("etag").utf8();
1551 std::string last_modified = 1551 std::string last_modified =
1552 response.httpHeaderField("last-modified").utf8(); 1552 response.httpHeaderField("last-modified").utf8();
1553 base::Time last_modified_time; 1553 base::Time last_modified_time;
1554 base::Time::FromString(last_modified.c_str(), &last_modified_time); 1554 base::Time::FromString(last_modified.c_str(), &last_modified_time);
1555 1555
1556 bool has_no_store_header = false; 1556 bool has_no_store_header = false;
1557 std::string cache_control = 1557 std::string cache_control =
1558 response.httpHeaderField("cache-control").utf8(); 1558 response.httpHeaderField("cache-control").utf8();
1559 1559
1560 std::vector<std::string> values; 1560 for (const std::string& cur : base::SplitString(
1561 base::SplitString(cache_control, ',', &values); 1561 cache_control, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
1562 for (std::vector<std::string>::const_iterator it = values.begin(); 1562 if (base::StringToLowerASCII(cur) == "no-store")
1563 it != values.end();
1564 ++it) {
1565 if (base::StringToLowerASCII(*it) == "no-store")
1566 has_no_store_header = true; 1563 has_no_store_header = true;
1567 } 1564 }
1568 1565
1569 GetNexeFd( 1566 GetNexeFd(
1570 instance_, pexe_url_, pexe_opt_level_, last_modified_time, etag, 1567 instance_, pexe_url_, pexe_opt_level_, last_modified_time, etag,
1571 has_no_store_header, use_subzero_, 1568 has_no_store_header, use_subzero_,
1572 base::Bind(&PexeDownloader::didGetNexeFd, weak_factory_.GetWeakPtr())); 1569 base::Bind(&PexeDownloader::didGetNexeFd, weak_factory_.GetWeakPtr()));
1573 } 1570 }
1574 1571
1575 virtual void didGetNexeFd(int32_t pp_error, 1572 virtual void didGetNexeFd(int32_t pp_error,
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 &StreamPexe 1699 &StreamPexe
1703 }; 1700 };
1704 1701
1705 } // namespace 1702 } // namespace
1706 1703
1707 const PPB_NaCl_Private* GetNaClPrivateInterface() { 1704 const PPB_NaCl_Private* GetNaClPrivateInterface() {
1708 return &nacl_interface; 1705 return &nacl_interface;
1709 } 1706 }
1710 1707
1711 } // namespace nacl 1708 } // namespace nacl
OLDNEW
« no previous file with comments | « components/nacl/browser/nacl_process_host.cc ('k') | components/nacl/zygote/nacl_fork_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698