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

Side by Side Diff: trunk/src/chrome/browser/history/history_types.cc

Issue 19637009: Revert 212459 "Remove TextDatabase from the history service." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/history/history_types.h ('k') | trunk/src/chrome/browser/history/text_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698