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

Side by Side Diff: WebCore/history/HistoryItem.cpp

Issue 6500005: Revert 78236 - Merge r76205, crbug 54262 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 9 years, 10 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 | « WebCore/history/HistoryItem.h ('k') | WebCore/loader/HistoryController.h » ('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) 2005, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 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
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void (*notifyHistoryItemChanged)(HistoryItem*) = defaultNotifyHistoryItemChanged ; 53 void (*notifyHistoryItemChanged)(HistoryItem*) = defaultNotifyHistoryItemChanged ;
54 54
55 HistoryItem::HistoryItem() 55 HistoryItem::HistoryItem()
56 : m_lastVisitedTime(0) 56 : m_lastVisitedTime(0)
57 , m_lastVisitWasHTTPNonGet(false) 57 , m_lastVisitWasHTTPNonGet(false)
58 , m_lastVisitWasFailure(false) 58 , m_lastVisitWasFailure(false)
59 , m_isTargetItem(false) 59 , m_isTargetItem(false)
60 , m_visitCount(0) 60 , m_visitCount(0)
61 , m_itemSequenceNumber(generateSequenceNumber()) 61 , m_itemSequenceNumber(generateSequenceNumber())
62 , m_documentSequenceNumber(generateSequenceNumber()) 62 , m_documentSequenceNumber(generateSequenceNumber())
63 , m_next(0)
64 , m_prev(0)
65 { 63 {
66 } 64 }
67 65
68 HistoryItem::HistoryItem(const String& urlString, const String& title, double ti me) 66 HistoryItem::HistoryItem(const String& urlString, const String& title, double ti me)
69 : m_urlString(urlString) 67 : m_urlString(urlString)
70 , m_originalURLString(urlString) 68 , m_originalURLString(urlString)
71 , m_title(title) 69 , m_title(title)
72 , m_lastVisitedTime(time) 70 , m_lastVisitedTime(time)
73 , m_lastVisitWasHTTPNonGet(false) 71 , m_lastVisitWasHTTPNonGet(false)
74 , m_lastVisitWasFailure(false) 72 , m_lastVisitWasFailure(false)
75 , m_isTargetItem(false) 73 , m_isTargetItem(false)
76 , m_visitCount(0) 74 , m_visitCount(0)
77 , m_itemSequenceNumber(generateSequenceNumber()) 75 , m_itemSequenceNumber(generateSequenceNumber())
78 , m_documentSequenceNumber(generateSequenceNumber()) 76 , m_documentSequenceNumber(generateSequenceNumber())
79 , m_next(0)
80 , m_prev(0)
81 { 77 {
82 iconDatabase()->retainIconForPageURL(m_urlString); 78 iconDatabase()->retainIconForPageURL(m_urlString);
83 } 79 }
84 80
85 HistoryItem::HistoryItem(const String& urlString, const String& title, const Str ing& alternateTitle, double time) 81 HistoryItem::HistoryItem(const String& urlString, const String& title, const Str ing& alternateTitle, double time)
86 : m_urlString(urlString) 82 : m_urlString(urlString)
87 , m_originalURLString(urlString) 83 , m_originalURLString(urlString)
88 , m_title(title) 84 , m_title(title)
89 , m_displayTitle(alternateTitle) 85 , m_displayTitle(alternateTitle)
90 , m_lastVisitedTime(time) 86 , m_lastVisitedTime(time)
91 , m_lastVisitWasHTTPNonGet(false) 87 , m_lastVisitWasHTTPNonGet(false)
92 , m_lastVisitWasFailure(false) 88 , m_lastVisitWasFailure(false)
93 , m_isTargetItem(false) 89 , m_isTargetItem(false)
94 , m_visitCount(0) 90 , m_visitCount(0)
95 , m_itemSequenceNumber(generateSequenceNumber()) 91 , m_itemSequenceNumber(generateSequenceNumber())
96 , m_documentSequenceNumber(generateSequenceNumber()) 92 , m_documentSequenceNumber(generateSequenceNumber())
97 , m_next(0)
98 , m_prev(0)
99 { 93 {
100 iconDatabase()->retainIconForPageURL(m_urlString); 94 iconDatabase()->retainIconForPageURL(m_urlString);
101 } 95 }
102 96
103 HistoryItem::HistoryItem(const KURL& url, const String& target, const String& pa rent, const String& title) 97 HistoryItem::HistoryItem(const KURL& url, const String& target, const String& pa rent, const String& title)
104 : m_urlString(url.string()) 98 : m_urlString(url.string())
105 , m_originalURLString(url.string()) 99 , m_originalURLString(url.string())
106 , m_target(target) 100 , m_target(target)
107 , m_parent(parent) 101 , m_parent(parent)
108 , m_title(title) 102 , m_title(title)
109 , m_lastVisitedTime(0) 103 , m_lastVisitedTime(0)
110 , m_lastVisitWasHTTPNonGet(false) 104 , m_lastVisitWasHTTPNonGet(false)
111 , m_lastVisitWasFailure(false) 105 , m_lastVisitWasFailure(false)
112 , m_isTargetItem(false) 106 , m_isTargetItem(false)
113 , m_visitCount(0) 107 , m_visitCount(0)
114 , m_itemSequenceNumber(generateSequenceNumber()) 108 , m_itemSequenceNumber(generateSequenceNumber())
115 , m_documentSequenceNumber(generateSequenceNumber()) 109 , m_documentSequenceNumber(generateSequenceNumber())
116 , m_next(0)
117 , m_prev(0)
118 { 110 {
119 iconDatabase()->retainIconForPageURL(m_urlString); 111 iconDatabase()->retainIconForPageURL(m_urlString);
120 } 112 }
121 113
122 HistoryItem::~HistoryItem() 114 HistoryItem::~HistoryItem()
123 { 115 {
124 ASSERT(!m_cachedPage); 116 ASSERT(!m_cachedPage);
125 iconDatabase()->releaseIconForPageURL(m_urlString); 117 iconDatabase()->releaseIconForPageURL(m_urlString);
126 #if PLATFORM(ANDROID) 118 #if PLATFORM(ANDROID)
127 if (m_bridge) 119 if (m_bridge)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 152
161 if (item.m_redirectURLs) 153 if (item.m_redirectURLs)
162 m_redirectURLs = adoptPtr(new Vector<String>(*item.m_redirectURLs)); 154 m_redirectURLs = adoptPtr(new Vector<String>(*item.m_redirectURLs));
163 } 155 }
164 156
165 PassRefPtr<HistoryItem> HistoryItem::copy() const 157 PassRefPtr<HistoryItem> HistoryItem::copy() const
166 { 158 {
167 return adoptRef(new HistoryItem(*this)); 159 return adoptRef(new HistoryItem(*this));
168 } 160 }
169 161
170 void HistoryItem::reset()
171 {
172 iconDatabase()->releaseIconForPageURL(m_urlString);
173
174 m_urlString = String();
175 m_originalURLString = String();
176 m_referrer = String();
177 m_target = String();
178 m_parent = String();
179 m_title = String();
180 m_displayTitle = String();
181
182 m_lastVisitedTime = 0;
183 m_lastVisitWasHTTPNonGet = false;
184
185 m_lastVisitWasFailure = false;
186 m_isTargetItem = false;
187 m_visitCount = 0;
188 m_dailyVisitCounts.clear();
189 m_weeklyVisitCounts.clear();
190
191 m_redirectURLs.clear();
192
193 m_itemSequenceNumber = generateSequenceNumber();
194
195 m_stateObject = 0;
196 m_documentSequenceNumber = generateSequenceNumber();
197
198 m_formData = 0;
199 m_formContentType = String();
200 }
201
202 const String& HistoryItem::urlString() const 162 const String& HistoryItem::urlString() const
203 { 163 {
204 return m_urlString; 164 return m_urlString;
205 } 165 }
206 166
207 // The first URL we loaded to get to where this history item points. Includes b oth client 167 // The first URL we loaded to get to where this history item points. Includes b oth client
208 // and server redirects. 168 // and server redirects.
209 const String& HistoryItem::originalURLString() const 169 const String& HistoryItem::originalURLString() const
210 { 170 {
211 return m_originalURLString; 171 return m_originalURLString;
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 } // namespace WebCore 648 } // namespace WebCore
689 649
690 #ifndef NDEBUG 650 #ifndef NDEBUG
691 651
692 int showTree(const WebCore::HistoryItem* item) 652 int showTree(const WebCore::HistoryItem* item)
693 { 653 {
694 return item->showTree(); 654 return item->showTree();
695 } 655 }
696 656
697 #endif 657 #endif
OLDNEW
« no previous file with comments | « WebCore/history/HistoryItem.h ('k') | WebCore/loader/HistoryController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698