OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/history/history_types.h" | 5 #include "chrome/browser/history/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" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 hidden_ = false; | 62 hidden_ = false; |
63 } | 63 } |
64 | 64 |
65 // VisitRow -------------------------------------------------------------------- | 65 // VisitRow -------------------------------------------------------------------- |
66 | 66 |
67 VisitRow::VisitRow() | 67 VisitRow::VisitRow() |
68 : visit_id(0), | 68 : visit_id(0), |
69 url_id(0), | 69 url_id(0), |
70 referring_visit(0), | 70 referring_visit(0), |
71 transition(content::PAGE_TRANSITION_LINK), | 71 transition(content::PAGE_TRANSITION_LINK), |
72 segment_id(0) { | 72 segment_id(0), |
| 73 is_indexed(false) { |
73 } | 74 } |
74 | 75 |
75 VisitRow::VisitRow(URLID arg_url_id, | 76 VisitRow::VisitRow(URLID arg_url_id, |
76 base::Time arg_visit_time, | 77 base::Time arg_visit_time, |
77 VisitID arg_referring_visit, | 78 VisitID arg_referring_visit, |
78 content::PageTransition arg_transition, | 79 content::PageTransition arg_transition, |
79 SegmentID arg_segment_id) | 80 SegmentID arg_segment_id) |
80 : visit_id(0), | 81 : visit_id(0), |
81 url_id(arg_url_id), | 82 url_id(arg_url_id), |
82 visit_time(arg_visit_time), | 83 visit_time(arg_visit_time), |
83 referring_visit(arg_referring_visit), | 84 referring_visit(arg_referring_visit), |
84 transition(arg_transition), | 85 transition(arg_transition), |
85 segment_id(arg_segment_id) { | 86 segment_id(arg_segment_id), |
| 87 is_indexed(false) { |
86 } | 88 } |
87 | 89 |
88 VisitRow::~VisitRow() { | 90 VisitRow::~VisitRow() { |
89 } | 91 } |
90 | 92 |
91 // URLResult ------------------------------------------------------------------- | 93 // URLResult ------------------------------------------------------------------- |
92 | 94 |
93 URLResult::URLResult() | 95 URLResult::URLResult() |
94 : blocked_visit_(false) { | 96 : blocked_visit_(false) { |
95 } | 97 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 if (match_index >= begin && match_index <= end) | 239 if (match_index >= begin && match_index <= end) |
238 i->second[match] += delta; | 240 i->second[match] += delta; |
239 } | 241 } |
240 } | 242 } |
241 } | 243 } |
242 | 244 |
243 // QueryOptions ---------------------------------------------------------------- | 245 // QueryOptions ---------------------------------------------------------------- |
244 | 246 |
245 QueryOptions::QueryOptions() | 247 QueryOptions::QueryOptions() |
246 : max_count(0), | 248 : max_count(0), |
| 249 body_only(false), |
247 duplicate_policy(QueryOptions::REMOVE_ALL_DUPLICATES) { | 250 duplicate_policy(QueryOptions::REMOVE_ALL_DUPLICATES) { |
248 } | 251 } |
249 | 252 |
250 void QueryOptions::SetRecentDayRange(int days_ago) { | 253 void QueryOptions::SetRecentDayRange(int days_ago) { |
251 end_time = base::Time::Now(); | 254 end_time = base::Time::Now(); |
252 begin_time = end_time - base::TimeDelta::FromDays(days_ago); | 255 begin_time = end_time - base::TimeDelta::FromDays(days_ago); |
253 } | 256 } |
254 | 257 |
255 int64 QueryOptions::EffectiveBeginTime() const { | 258 int64 QueryOptions::EffectiveBeginTime() const { |
256 return begin_time.ToInternalValue(); | 259 return begin_time.ToInternalValue(); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 | 425 |
423 void ExpireHistoryArgs::SetTimeRangeForOneDay(base::Time time) { | 426 void ExpireHistoryArgs::SetTimeRangeForOneDay(base::Time time) { |
424 begin_time = time.LocalMidnight(); | 427 begin_time = time.LocalMidnight(); |
425 | 428 |
426 // Due to DST, leap seconds, etc., the next day at midnight may be more than | 429 // Due to DST, leap seconds, etc., the next day at midnight may be more than |
427 // 24 hours away, so add 36 hours and round back down to midnight. | 430 // 24 hours away, so add 36 hours and round back down to midnight. |
428 end_time = (begin_time + base::TimeDelta::FromHours(36)).LocalMidnight(); | 431 end_time = (begin_time + base::TimeDelta::FromHours(36)).LocalMidnight(); |
429 } | 432 } |
430 | 433 |
431 } // namespace history | 434 } // namespace history |
OLD | NEW |