OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
9 * | 9 * |
10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 static bool needsHistoryItemRestore(FrameLoadType type) | 107 static bool needsHistoryItemRestore(FrameLoadType type) |
108 { | 108 { |
109 return type == FrameLoadTypeBackForward || type == FrameLoadTypeReload | 109 return type == FrameLoadTypeBackForward || type == FrameLoadTypeReload |
110 || type == FrameLoadTypeReloadFromOrigin; | 110 || type == FrameLoadTypeReloadFromOrigin; |
111 } | 111 } |
112 | 112 |
113 // static | 113 // static |
114 ResourceRequest FrameLoader::resourceRequestFromHistoryItem(HistoryItem* item, | 114 ResourceRequest FrameLoader::resourceRequestFromHistoryItem(HistoryItem* item, |
115 ResourceRequestCachePolicy cachePolicy) | 115 ResourceRequestCachePolicy cachePolicy) |
116 { | 116 { |
117 RefPtr<FormData> formData = item->formData(); | 117 RefPtr<EncodedFormData> formData = item->formData(); |
118 ResourceRequest request(item->url()); | 118 ResourceRequest request(item->url()); |
119 request.setHTTPReferrer(item->referrer()); | 119 request.setHTTPReferrer(item->referrer()); |
120 request.setCachePolicy(cachePolicy); | 120 request.setCachePolicy(cachePolicy); |
121 if (formData) { | 121 if (formData) { |
122 request.setHTTPMethod("POST"); | 122 request.setHTTPMethod("POST"); |
123 request.setHTTPBody(formData); | 123 request.setHTTPBody(formData); |
124 request.setHTTPContentType(item->formContentType()); | 124 request.setHTTPContentType(item->formContentType()); |
125 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::createFromString
(item->referrer().referrer); | 125 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::createFromString
(item->referrer().referrer); |
126 request.addHTTPOriginIfNeeded(securityOrigin->toAtomicString()); | 126 request.addHTTPOriginIfNeeded(securityOrigin->toAtomicString()); |
127 } | 127 } |
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 // FIXME: We need a way to propagate insecure requests policy flags to | 1517 // FIXME: We need a way to propagate insecure requests policy flags to |
1518 // out-of-process frames. For now, we'll always use default behavior. | 1518 // out-of-process frames. For now, we'll always use default behavior. |
1519 if (!parentFrame->isLocalFrame()) | 1519 if (!parentFrame->isLocalFrame()) |
1520 return nullptr; | 1520 return nullptr; |
1521 | 1521 |
1522 ASSERT(toLocalFrame(parentFrame)->document()); | 1522 ASSERT(toLocalFrame(parentFrame)->document()); |
1523 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1523 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
1524 } | 1524 } |
1525 | 1525 |
1526 } // namespace blink | 1526 } // namespace blink |
OLD | NEW |