| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 bool isReloadLoadType(FrameLoadType type) | 116 bool isReloadLoadType(FrameLoadType type) |
| 117 { | 117 { |
| 118 return type == FrameLoadTypeReload | 118 return type == FrameLoadTypeReload |
| 119 || type == FrameLoadTypeReloadMainResource | 119 || type == FrameLoadTypeReloadMainResource |
| 120 || type == FrameLoadTypeReloadBypassingCache; | 120 || type == FrameLoadTypeReloadBypassingCache; |
| 121 } | 121 } |
| 122 | 122 |
| 123 static bool needsHistoryItemRestore(FrameLoadType type) | 123 static bool needsHistoryItemRestore(FrameLoadType type) |
| 124 { | 124 { |
| 125 // TODO(toyoshim): Check if this should return true for | 125 if (!RuntimeEnabledFeatures::nonValidatingReloadEnabled() && type == FrameLo
adTypeReloadMainResource) |
| 126 // FrameLoadTypeReloadMainResource. | 126 return false; |
| 127 return type == FrameLoadTypeBackForward | 127 // TODO(toyoshim): Shall we return true for FrameLoadTypeInitialHistoryLoad
too? |
| 128 || type == FrameLoadTypeReload | 128 return type == FrameLoadTypeBackForward || isReloadLoadType(type); |
| 129 || type == FrameLoadTypeReloadBypassingCache; | |
| 130 } | 129 } |
| 131 | 130 |
| 132 // static | 131 // static |
| 133 ResourceRequest FrameLoader::resourceRequestFromHistoryItem(HistoryItem* item, W
ebCachePolicy cachePolicy) | 132 ResourceRequest FrameLoader::resourceRequestFromHistoryItem(HistoryItem* item, W
ebCachePolicy cachePolicy) |
| 134 { | 133 { |
| 135 RefPtr<EncodedFormData> formData = item->formData(); | 134 RefPtr<EncodedFormData> formData = item->formData(); |
| 136 ResourceRequest request(item->url()); | 135 ResourceRequest request(item->url()); |
| 137 request.setHTTPReferrer(item->referrer()); | 136 request.setHTTPReferrer(item->referrer()); |
| 138 request.setCachePolicy(cachePolicy); | 137 request.setCachePolicy(cachePolicy); |
| 139 if (formData) { | 138 if (formData) { |
| (...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1619 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); | 1618 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); |
| 1620 return tracedValue; | 1619 return tracedValue; |
| 1621 } | 1620 } |
| 1622 | 1621 |
| 1623 inline void FrameLoader::takeObjectSnapshot() const | 1622 inline void FrameLoader::takeObjectSnapshot() const |
| 1624 { | 1623 { |
| 1625 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); | 1624 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); |
| 1626 } | 1625 } |
| 1627 | 1626 |
| 1628 } // namespace blink | 1627 } // namespace blink |
| OLD | NEW |