OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "net/spdy/spdy_http_utils.h" | 5 #include "net/spdy/spdy_http_utils.h" |
6 | 6 |
| 7 #include <string> |
| 8 |
7 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
8 #include "base/string_util.h" | 10 #include "base/string_util.h" |
9 #include "base/time.h" | 11 #include "base/time.h" |
10 #include "net/base/load_flags.h" | 12 #include "net/base/load_flags.h" |
11 #include "net/base/net_util.h" | 13 #include "net/base/net_util.h" |
12 #include "net/http/http_request_headers.h" | 14 #include "net/http/http_request_headers.h" |
13 #include "net/http/http_request_info.h" | 15 #include "net/http/http_request_info.h" |
14 #include "net/http/http_response_headers.h" | 16 #include "net/http/http_response_headers.h" |
15 #include "net/http/http_response_info.h" | 17 #include "net/http/http_response_info.h" |
16 #include "net/http/http_util.h" | 18 #include "net/http/http_util.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Honor load flags that impact proxy caches. | 134 // Honor load flags that impact proxy caches. |
133 if (info.load_flags & LOAD_BYPASS_CACHE) { | 135 if (info.load_flags & LOAD_BYPASS_CACHE) { |
134 (*headers)["pragma"] = "no-cache"; | 136 (*headers)["pragma"] = "no-cache"; |
135 (*headers)["cache-control"] = "no-cache"; | 137 (*headers)["cache-control"] = "no-cache"; |
136 } else if (info.load_flags & LOAD_VALIDATE_CACHE) { | 138 } else if (info.load_flags & LOAD_VALIDATE_CACHE) { |
137 (*headers)["cache-control"] = "max-age=0"; | 139 (*headers)["cache-control"] = "max-age=0"; |
138 } | 140 } |
139 } | 141 } |
140 | 142 |
141 } // namespace net | 143 } // namespace net |
OLD | NEW |