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

Side by Side Diff: components/history/core/browser/history_types.h

Issue 2338133006: [NTP] Fix article suggestion clicks contributing to Most Visited tiles (Closed)
Patch Set: Moved to HistoryTabHelper as suggested. Created 4 years, 3 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
OLDNEW
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
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
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, false)
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 skip_for_ntp_most_visited);
sky 2016/09/15 22:56:10 Variables with negative names in them are harder t
mastiz 2016/09/16 08:42:10 Done. I avoided the default value for consistency.
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 bool ignore_for_ntp_most_visited;
398 }; 400 };
399 401
400 // TopSites ------------------------------------------------------------------- 402 // TopSites -------------------------------------------------------------------
401 403
402 typedef std::vector<MostVisitedURL> MostVisitedURLList; 404 typedef std::vector<MostVisitedURL> MostVisitedURLList;
403 typedef std::vector<FilteredURL> FilteredURLList; 405 typedef std::vector<FilteredURL> FilteredURLList;
404 406
405 // Used by TopSites to store the thumbnails. 407 // Used by TopSites to store the thumbnails.
406 struct Images { 408 struct Images {
407 Images(); 409 Images();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 void SetTimeRangeForOneDay(base::Time time); 550 void SetTimeRangeForOneDay(base::Time time);
549 551
550 std::set<GURL> urls; 552 std::set<GURL> urls;
551 base::Time begin_time; 553 base::Time begin_time;
552 base::Time end_time; 554 base::Time end_time;
553 }; 555 };
554 556
555 } // namespace history 557 } // namespace history
556 558
557 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_ 559 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698