OLD | NEW |
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 "native_client/src/trusted/plugin/nacl_http_response_headers.h" | 5 #include "native_client/src/trusted/plugin/nacl_http_response_headers.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 namespace { | 10 namespace { |
11 | 11 |
12 // TODO(jvoung) use Tokenize from base/string_util.h when this moves | 12 // TODO(jvoung): Use Tokenize from base/strings/string_util.h when this moves |
13 // to chromium. | 13 // to Chromium. |
14 void SplitString(const std::string& str, | 14 void SplitString(const std::string& str, |
15 char delim, | 15 char delim, |
16 std::vector<std::string>* elems) { | 16 std::vector<std::string>* elems) { |
17 std::stringstream ss(str); | 17 std::stringstream ss(str); |
18 std::string item; | 18 std::string item; |
19 while (std::getline(ss, item, delim)) { | 19 while (std::getline(ss, item, delim)) { |
20 elems->push_back(item); | 20 elems->push_back(item); |
21 } | 21 } |
22 } | 22 } |
23 | 23 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 std::string cc = entry.second; | 98 std::string cc = entry.second; |
99 std::transform(cc.begin(), cc.end(), cc.begin(), ::tolower); | 99 std::transform(cc.begin(), cc.end(), cc.begin(), ::tolower); |
100 if (entry.second.find("no-store") != std::string::npos) | 100 if (entry.second.find("no-store") != std::string::npos) |
101 return true; | 101 return true; |
102 } | 102 } |
103 } | 103 } |
104 return false; | 104 return false; |
105 } | 105 } |
106 | 106 |
107 } // namespace plugin | 107 } // namespace plugin |
OLD | NEW |