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