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

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

Issue 1143183002: Proof of concept implementation of context based history filtering. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 #include "components/history/core/browser/history_types.h" 5 #include "components/history/core/browser/history_types.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "components/history/core/browser/page_usage_data.h" 11 #include "components/history/core/browser/page_usage_data.h"
12 12
13 namespace history { 13 namespace history {
14 14
15 // VisitRow -------------------------------------------------------------------- 15 // VisitRow --------------------------------------------------------------------
16 16
17 VisitRow::VisitRow() 17 VisitRow::VisitRow()
18 : visit_id(0), 18 : visit_id(0),
19 url_id(0), 19 url_id(0),
20 referring_visit(0), 20 referring_visit(0),
21 transition(ui::PAGE_TRANSITION_LINK), 21 transition(ui::PAGE_TRANSITION_LINK),
22 segment_id(0) { 22 segment_id(0),
23 context(HistoryContext::CONTEXT_NONE) {
23 } 24 }
24 25
25 VisitRow::VisitRow(URLID arg_url_id, 26 VisitRow::VisitRow(URLID arg_url_id,
26 base::Time arg_visit_time, 27 base::Time arg_visit_time,
27 VisitID arg_referring_visit, 28 VisitID arg_referring_visit,
28 ui::PageTransition arg_transition, 29 ui::PageTransition arg_transition,
29 SegmentID arg_segment_id) 30 SegmentID arg_segment_id)
30 : visit_id(0), 31 : visit_id(0),
31 url_id(arg_url_id), 32 url_id(arg_url_id),
32 visit_time(arg_visit_time), 33 visit_time(arg_visit_time),
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 322
322 void ExpireHistoryArgs::SetTimeRangeForOneDay(base::Time time) { 323 void ExpireHistoryArgs::SetTimeRangeForOneDay(base::Time time) {
323 begin_time = time.LocalMidnight(); 324 begin_time = time.LocalMidnight();
324 325
325 // Due to DST, leap seconds, etc., the next day at midnight may be more than 326 // Due to DST, leap seconds, etc., the next day at midnight may be more than
326 // 24 hours away, so add 36 hours and round back down to midnight. 327 // 24 hours away, so add 36 hours and round back down to midnight.
327 end_time = (begin_time + base::TimeDelta::FromHours(36)).LocalMidnight(); 328 end_time = (begin_time + base::TimeDelta::FromHours(36)).LocalMidnight();
328 } 329 }
329 330
330 } // namespace history 331 } // namespace history
OLDNEW
« no previous file with comments | « components/history/core/browser/history_types.h ('k') | components/history/core/browser/url_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698