OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ |
6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 GURL url; | 325 GURL url; |
326 base::string16 title; | 326 base::string16 title; |
327 | 327 |
328 // If this is a URL for which we want to force a thumbnail, records the last | 328 // If this is a URL for which we want to force a thumbnail, records the last |
329 // time it was forced so we can evict it when more recent URLs are requested. | 329 // time it was forced so we can evict it when more recent URLs are requested. |
330 // If it's not a forced thumbnail, keep a time of 0. | 330 // If it's not a forced thumbnail, keep a time of 0. |
331 base::Time last_forced_time; | 331 base::Time last_forced_time; |
332 | 332 |
333 RedirectList redirects; | 333 RedirectList redirects; |
334 | 334 |
335 bool operator==(const MostVisitedURL& other) { | 335 bool operator==(const MostVisitedURL& other) const { |
336 return url == other.url; | 336 return url == other.url; |
337 } | 337 } |
338 }; | 338 }; |
339 | 339 |
340 // FilteredURL ----------------------------------------------------------------- | 340 // FilteredURL ----------------------------------------------------------------- |
341 | 341 |
342 // Holds the per-URL information of the filterd url query. | 342 // Holds the per-URL information of the filterd url query. |
343 struct FilteredURL { | 343 struct FilteredURL { |
344 struct ExtendedInfo { | 344 struct ExtendedInfo { |
345 ExtendedInfo(); | 345 ExtendedInfo(); |
(...skipping 19 matching lines...) Expand all Loading... |
365 | 365 |
366 // Navigation ----------------------------------------------------------------- | 366 // Navigation ----------------------------------------------------------------- |
367 | 367 |
368 // Marshalling structure for AddPage. | 368 // Marshalling structure for AddPage. |
369 struct HistoryAddPageArgs { | 369 struct HistoryAddPageArgs { |
370 // The default constructor is equivalent to: | 370 // The default constructor is equivalent to: |
371 // | 371 // |
372 // HistoryAddPageArgs( | 372 // HistoryAddPageArgs( |
373 // GURL(), base::Time(), NULL, 0, GURL(), | 373 // GURL(), base::Time(), NULL, 0, GURL(), |
374 // RedirectList(), ui::PAGE_TRANSITION_LINK, | 374 // RedirectList(), ui::PAGE_TRANSITION_LINK, |
375 // SOURCE_BROWSED, false) | 375 // SOURCE_BROWSED, false, true) |
376 HistoryAddPageArgs(); | 376 HistoryAddPageArgs(); |
377 HistoryAddPageArgs(const GURL& url, | 377 HistoryAddPageArgs(const GURL& url, |
378 base::Time time, | 378 base::Time time, |
379 ContextID context_id, | 379 ContextID context_id, |
380 int nav_entry_id, | 380 int nav_entry_id, |
381 const GURL& referrer, | 381 const GURL& referrer, |
382 const RedirectList& redirects, | 382 const RedirectList& redirects, |
383 ui::PageTransition transition, | 383 ui::PageTransition transition, |
384 VisitSource source, | 384 VisitSource source, |
385 bool did_replace_entry); | 385 bool did_replace_entry, |
| 386 bool consider_for_ntp_most_visited); |
386 HistoryAddPageArgs(const HistoryAddPageArgs& other); | 387 HistoryAddPageArgs(const HistoryAddPageArgs& other); |
387 ~HistoryAddPageArgs(); | 388 ~HistoryAddPageArgs(); |
388 | 389 |
389 GURL url; | 390 GURL url; |
390 base::Time time; | 391 base::Time time; |
391 ContextID context_id; | 392 ContextID context_id; |
392 int nav_entry_id; | 393 int nav_entry_id; |
393 GURL referrer; | 394 GURL referrer; |
394 RedirectList redirects; | 395 RedirectList redirects; |
395 ui::PageTransition transition; | 396 ui::PageTransition transition; |
396 VisitSource visit_source; | 397 VisitSource visit_source; |
397 bool did_replace_entry; | 398 bool did_replace_entry; |
| 399 // Specifies whether a page visit should contribute to the Most Visited tiles |
| 400 // in the New Tab Page. Note that setting this to true (most common case) |
| 401 // doesn't guarantee it's relevant for Most Visited, since other requirements |
| 402 // exist (e.g. certain page transition types). |
| 403 bool consider_for_ntp_most_visited; |
398 }; | 404 }; |
399 | 405 |
400 // TopSites ------------------------------------------------------------------- | 406 // TopSites ------------------------------------------------------------------- |
401 | 407 |
402 typedef std::vector<MostVisitedURL> MostVisitedURLList; | 408 typedef std::vector<MostVisitedURL> MostVisitedURLList; |
403 typedef std::vector<FilteredURL> FilteredURLList; | 409 typedef std::vector<FilteredURL> FilteredURLList; |
404 | 410 |
405 // Used by TopSites to store the thumbnails. | 411 // Used by TopSites to store the thumbnails. |
406 struct Images { | 412 struct Images { |
407 Images(); | 413 Images(); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 void SetTimeRangeForOneDay(base::Time time); | 554 void SetTimeRangeForOneDay(base::Time time); |
549 | 555 |
550 std::set<GURL> urls; | 556 std::set<GURL> urls; |
551 base::Time begin_time; | 557 base::Time begin_time; |
552 base::Time end_time; | 558 base::Time end_time; |
553 }; | 559 }; |
554 | 560 |
555 } // namespace history | 561 } // namespace history |
556 | 562 |
557 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ | 563 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ |
OLD | NEW |