Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Side by Side Diff: history/HistoryItem.h

Issue 220010: Store non-standard HTTP headers in history. (WebKit side) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | history/HistoryItem.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef HistoryItem_h 26 #ifndef HistoryItem_h
27 #define HistoryItem_h 27 #define HistoryItem_h
28 28
29 #include "IntPoint.h" 29 #include "IntPoint.h"
30 #include "HTTPHeaderMap.h"
30 #include "PlatformString.h" 31 #include "PlatformString.h"
31 #include <wtf/OwnPtr.h> 32 #include <wtf/OwnPtr.h>
32 #include <wtf/PassOwnPtr.h> 33 #include <wtf/PassOwnPtr.h>
33 34
34 #if PLATFORM(MAC) 35 #if PLATFORM(MAC)
35 #import <wtf/RetainPtr.h> 36 #import <wtf/RetainPtr.h>
36 typedef struct objc_object* id; 37 typedef struct objc_object* id;
37 #endif 38 #endif
38 39
39 #if PLATFORM(QT) 40 #if PLATFORM(QT)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const String& alternateTitle() const; 96 const String& alternateTitle() const;
96 97
97 Image* icon() const; 98 Image* icon() const;
98 99
99 const String& parent() const; 100 const String& parent() const;
100 KURL url() const; 101 KURL url() const;
101 KURL originalURL() const; 102 KURL originalURL() const;
102 const String& referrer() const; 103 const String& referrer() const;
103 const String& target() const; 104 const String& target() const;
104 bool isTargetItem() const; 105 bool isTargetItem() const;
106 const HTTPHeaderMap& httpHeaderFields() const;
105 107
106 FormData* formData(); 108 FormData* formData();
107 String formContentType() const; 109 String formContentType() const;
108 110
109 int visitCount() const; 111 int visitCount() const;
110 bool lastVisitWasFailure() const { return m_lastVisitWasFailure; } 112 bool lastVisitWasFailure() const { return m_lastVisitWasFailure; }
111 bool lastVisitWasHTTPNonGet() const { return m_lastVisitWasHTTPNonGet; } 113 bool lastVisitWasHTTPNonGet() const { return m_lastVisitWasHTTPNonGet; }
112 114
113 void mergeAutoCompleteHints(HistoryItem* otherItem); 115 void mergeAutoCompleteHints(HistoryItem* otherItem);
114 116
115 const IntPoint& scrollPoint() const; 117 const IntPoint& scrollPoint() const;
116 void setScrollPoint(const IntPoint&); 118 void setScrollPoint(const IntPoint&);
117 void clearScrollPoint(); 119 void clearScrollPoint();
118 const Vector<String>& documentState() const; 120 const Vector<String>& documentState() const;
119 void setDocumentState(const Vector<String>&); 121 void setDocumentState(const Vector<String>&);
120 void clearDocumentState(); 122 void clearDocumentState();
121 123
122 void setURL(const KURL&); 124 void setURL(const KURL&);
123 void setURLString(const String&); 125 void setURLString(const String&);
124 void setOriginalURLString(const String&); 126 void setOriginalURLString(const String&);
125 void setReferrer(const String&); 127 void setReferrer(const String&);
126 void setTarget(const String&); 128 void setTarget(const String&);
127 void setParent(const String&); 129 void setParent(const String&);
128 void setTitle(const String&); 130 void setTitle(const String&);
129 void setIsTargetItem(bool); 131 void setIsTargetItem(bool);
132 void setHTTPHeaderField(const String&, const String&);
130 133
131 void setFormInfoFromRequest(const ResourceRequest&); 134 void setFormInfoFromRequest(const ResourceRequest&);
132 void setFormData(PassRefPtr<FormData>); 135 void setFormData(PassRefPtr<FormData>);
133 void setFormContentType(const String&); 136 void setFormContentType(const String&);
134 137
135 void recordInitialVisit(); 138 void recordInitialVisit();
136 139
137 void setVisitCount(int); 140 void setVisitCount(int);
138 void setLastVisitWasFailure(bool wasFailure) { m_lastVisitWasFailure = wasFa ilure; } 141 void setLastVisitWasFailure(bool wasFailure) { m_lastVisitWasFailure = wasFa ilure; }
139 void setLastVisitWasHTTPNonGet(bool wasNotGet) { m_lastVisitWasHTTPNonGet = wasNotGet; } 142 void setLastVisitWasHTTPNonGet(bool wasNotGet) { m_lastVisitWasHTTPNonGet = wasNotGet; }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 HistoryItem(const String& urlString, const String& title, double lastVisited ); 192 HistoryItem(const String& urlString, const String& title, double lastVisited );
190 HistoryItem(const String& urlString, const String& title, const String& alte rnateTitle, double lastVisited); 193 HistoryItem(const String& urlString, const String& title, const String& alte rnateTitle, double lastVisited);
191 HistoryItem(const KURL& url, const String& frameName, const String& parent, const String& title); 194 HistoryItem(const KURL& url, const String& frameName, const String& parent, const String& title);
192 195
193 HistoryItem(const HistoryItem&); 196 HistoryItem(const HistoryItem&);
194 197
195 void padDailyCountsForNewVisit(double time); 198 void padDailyCountsForNewVisit(double time);
196 void collapseDailyVisitsToWeekly(); 199 void collapseDailyVisitsToWeekly();
197 void recordVisitAtTime(double, VisitCountBehavior = IncreaseVisitCount); 200 void recordVisitAtTime(double, VisitCountBehavior = IncreaseVisitCount);
198 201
202 // Return true if the HTTP header should not be stored in the history
203 bool excludeHTTPHeaderFromStorage(const String& name) const;
204
199 HistoryItem* findTargetItem(); 205 HistoryItem* findTargetItem();
200 206
201 /* When adding new member variables to this class, please notify the Qt team . 207 /* When adding new member variables to this class, please notify the Qt team .
202 * qt/HistoryItemQt.cpp contains code to serialize history items. 208 * qt/HistoryItemQt.cpp contains code to serialize history items.
203 */ 209 */
204 210
205 String m_urlString; 211 String m_urlString;
206 String m_originalURLString; 212 String m_originalURLString;
207 String m_referrer; 213 String m_referrer;
208 String m_target; 214 String m_target;
(...skipping 14 matching lines...) Expand all
223 int m_visitCount; 229 int m_visitCount;
224 Vector<int> m_dailyVisitCounts; 230 Vector<int> m_dailyVisitCounts;
225 Vector<int> m_weeklyVisitCounts; 231 Vector<int> m_weeklyVisitCounts;
226 232
227 OwnPtr<Vector<String> > m_redirectURLs; 233 OwnPtr<Vector<String> > m_redirectURLs;
228 234
229 // info used to repost form data 235 // info used to repost form data
230 RefPtr<FormData> m_formData; 236 RefPtr<FormData> m_formData;
231 String m_formContentType; 237 String m_formContentType;
232 238
239 HTTPHeaderMap m_httpHeadersMap;
240
233 // PageCache controls these fields. 241 // PageCache controls these fields.
234 HistoryItem* m_next; 242 HistoryItem* m_next;
235 HistoryItem* m_prev; 243 HistoryItem* m_prev;
236 RefPtr<CachedPage> m_cachedPage; 244 RefPtr<CachedPage> m_cachedPage;
237 245
238 #if PLATFORM(MAC) 246 #if PLATFORM(MAC)
239 RetainPtr<id> m_viewState; 247 RetainPtr<id> m_viewState;
240 OwnPtr<HashMap<String, RetainPtr<id> > > m_transientProperties; 248 OwnPtr<HashMap<String, RetainPtr<id> > > m_transientProperties;
241 #endif 249 #endif
242 250
243 #if PLATFORM(QT) 251 #if PLATFORM(QT)
244 QVariant m_userData; 252 QVariant m_userData;
245 #endif 253 #endif
246 }; //class HistoryItem 254 }; //class HistoryItem
247 255
248 } //namespace WebCore 256 } //namespace WebCore
249 257
250 #ifndef NDEBUG 258 #ifndef NDEBUG
251 // Outside the WebCore namespace for ease of invocation from gdb. 259 // Outside the WebCore namespace for ease of invocation from gdb.
252 extern "C" int showTree(const WebCore::HistoryItem*); 260 extern "C" int showTree(const WebCore::HistoryItem*);
253 #endif 261 #endif
254 262
255 #endif // HISTORYITEM_H 263 #endif // HISTORYITEM_H
OLDNEW
« no previous file with comments | « no previous file | history/HistoryItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698