OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_H__ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_H__ |
6 #define CHROME_BROWSER_HISTORY_HISTORY_H__ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_H__ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // | 148 // |
149 // The scope/ids can be NULL if there is no meaningful tracking information | 149 // The scope/ids can be NULL if there is no meaningful tracking information |
150 // that can be performed on the given URL. The 'page_id' should be the ID of | 150 // that can be performed on the given URL. The 'page_id' should be the ID of |
151 // the current session history entry in the given process. | 151 // the current session history entry in the given process. |
152 // | 152 // |
153 // 'redirects' is an array of redirect URLs leading to this page, with the | 153 // 'redirects' is an array of redirect URLs leading to this page, with the |
154 // page itself as the last item (so when there is no redirect, it will have | 154 // page itself as the last item (so when there is no redirect, it will have |
155 // one entry). If there are no redirects, this array may also be empty for | 155 // one entry). If there are no redirects, this array may also be empty for |
156 // the convenience of callers. | 156 // the convenience of callers. |
157 // | 157 // |
| 158 // 'did_replace_entry' is true when the navigation entry for this page has |
| 159 // replaced the existing entry. A non-user initiated redirect causes such |
| 160 // replacement. |
| 161 // |
158 // All "Add Page" functions will update the visited link database. | 162 // All "Add Page" functions will update the visited link database. |
159 void AddPage(const GURL& url, | 163 void AddPage(const GURL& url, |
160 const void* id_scope, | 164 const void* id_scope, |
161 int32 page_id, | 165 int32 page_id, |
162 const GURL& referrer, | 166 const GURL& referrer, |
163 PageTransition::Type transition, | 167 PageTransition::Type transition, |
164 const RedirectList& redirects); | 168 const RedirectList& redirects, |
| 169 bool did_replace_entry); |
165 | 170 |
166 // For adding pages to history with a specific time. This is for testing | 171 // For adding pages to history with a specific time. This is for testing |
167 // purposes. Call the previous one to use the current time. | 172 // purposes. Call the previous one to use the current time. |
168 void AddPage(const GURL& url, | 173 void AddPage(const GURL& url, |
169 base::Time time, | 174 base::Time time, |
170 const void* id_scope, | 175 const void* id_scope, |
171 int32 page_id, | 176 int32 page_id, |
172 const GURL& referrer, | 177 const GURL& referrer, |
173 PageTransition::Type transition, | 178 PageTransition::Type transition, |
174 const RedirectList& redirects); | 179 const RedirectList& redirects, |
| 180 bool did_replace_entry); |
175 | 181 |
176 // For adding pages to history where no tracking information can be done. | 182 // For adding pages to history where no tracking information can be done. |
177 void AddPage(const GURL& url) { | 183 void AddPage(const GURL& url) { |
178 AddPage(url, NULL, 0, GURL::EmptyGURL(), PageTransition::LINK, | 184 AddPage(url, NULL, 0, GURL::EmptyGURL(), PageTransition::LINK, |
179 RedirectList()); | 185 RedirectList(), false); |
180 } | 186 } |
181 | 187 |
182 // Sets the title for the given page. The page should be in history. If it | 188 // Sets the title for the given page. The page should be in history. If it |
183 // is not, this operation is ignored. This call will not update the full | 189 // is not, this operation is ignored. This call will not update the full |
184 // text index. The last title set when the page is indexed will be the | 190 // text index. The last title set when the page is indexed will be the |
185 // title in the full text index. | 191 // title in the full text index. |
186 void SetPageTitle(const GURL& url, const std::wstring& title); | 192 void SetPageTitle(const GURL& url, const std::wstring& title); |
187 | 193 |
188 // Indexing ------------------------------------------------------------------ | 194 // Indexing ------------------------------------------------------------------ |
189 | 195 |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 Profile* profile_; | 775 Profile* profile_; |
770 | 776 |
771 // Has the backend finished loading? The backend is loaded once Init has | 777 // Has the backend finished loading? The backend is loaded once Init has |
772 // completed. | 778 // completed. |
773 bool backend_loaded_; | 779 bool backend_loaded_; |
774 | 780 |
775 DISALLOW_EVIL_CONSTRUCTORS(HistoryService); | 781 DISALLOW_EVIL_CONSTRUCTORS(HistoryService); |
776 }; | 782 }; |
777 | 783 |
778 #endif // CHROME_BROWSER_HISTORY_HISTORY_H__ | 784 #endif // CHROME_BROWSER_HISTORY_HISTORY_H__ |
OLD | NEW |