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::reloadwithoutSubResourceCacheRevalidationEnable
d() && type == FrameLoadTypeReloadMainResource) |
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 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1616 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); | 1615 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); |
1617 return tracedValue; | 1616 return tracedValue; |
1618 } | 1617 } |
1619 | 1618 |
1620 inline void FrameLoader::takeObjectSnapshot() const | 1619 inline void FrameLoader::takeObjectSnapshot() const |
1621 { | 1620 { |
1622 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); | 1621 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); |
1623 } | 1622 } |
1624 | 1623 |
1625 } // namespace blink | 1624 } // namespace blink |
OLD | NEW |