OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1955 | 1955 |
1956 // If the page contained a client redirect (meta refresh, document.loc...), | 1956 // If the page contained a client redirect (meta refresh, document.loc...), |
1957 // set the referrer and transition appropriately. | 1957 // set the referrer and transition appropriately. |
1958 if (ds->isClientRedirect()) { | 1958 if (ds->isClientRedirect()) { |
1959 params.referrer = Referrer(params.redirects[0], | 1959 params.referrer = Referrer(params.redirects[0], |
1960 GetReferrerPolicyFromRequest(frame, ds->request())); | 1960 GetReferrerPolicyFromRequest(frame, ds->request())); |
1961 params.transition = static_cast<PageTransition>( | 1961 params.transition = static_cast<PageTransition>( |
1962 params.transition | PAGE_TRANSITION_CLIENT_REDIRECT); | 1962 params.transition | PAGE_TRANSITION_CLIENT_REDIRECT); |
1963 } else { | 1963 } else { |
1964 // Bug 654101: the referrer will be empty on https->http transitions. It | 1964 // Bug 654101: the referrer will be empty on https->http transitions. It |
1965 // would be nice if we could get the real referrer from somewhere. | 1965 // would be nice if we could get the real referrer from somewhere. |
nasko
2014/01/08 17:11:09
Is this comment still valid after your change?
jochen (gone - plz use gerrit)
2014/01/08 19:06:04
Yes, if the referrer was stripped, it's not on any
| |
1966 params.referrer = GetReferrerFromRequest(frame, original_request); | 1966 params.referrer = GetReferrerFromRequest(frame, ds->request()); |
1967 } | 1967 } |
1968 | 1968 |
1969 base::string16 method = request.httpMethod(); | 1969 base::string16 method = request.httpMethod(); |
1970 if (EqualsASCII(method, "POST")) { | 1970 if (EqualsASCII(method, "POST")) { |
1971 params.is_post = true; | 1971 params.is_post = true; |
1972 params.post_id = ExtractPostId(item); | 1972 params.post_id = ExtractPostId(item); |
1973 } | 1973 } |
1974 | 1974 |
1975 // Send the user agent override back. | 1975 // Send the user agent override back. |
1976 params.is_overriding_user_agent = internal_data->is_overriding_user_agent(); | 1976 params.is_overriding_user_agent = internal_data->is_overriding_user_agent(); |
(...skipping 4396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6373 for (size_t i = 0; i < icon_urls.size(); i++) { | 6373 for (size_t i = 0; i < icon_urls.size(); i++) { |
6374 WebURL url = icon_urls[i].iconURL(); | 6374 WebURL url = icon_urls[i].iconURL(); |
6375 if (!url.isEmpty()) | 6375 if (!url.isEmpty()) |
6376 urls.push_back(FaviconURL(url, | 6376 urls.push_back(FaviconURL(url, |
6377 ToFaviconType(icon_urls[i].iconType()))); | 6377 ToFaviconType(icon_urls[i].iconType()))); |
6378 } | 6378 } |
6379 SendUpdateFaviconURL(urls); | 6379 SendUpdateFaviconURL(urls); |
6380 } | 6380 } |
6381 | 6381 |
6382 } // namespace content | 6382 } // namespace content |
OLD | NEW |