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

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

Issue 896093004: Cleanup usage of history namespace in components/history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 (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 "components/history/core/browser/visit_database.h" 5 #include "components/history/core/browser/visit_database.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 base::TimeDelta::FromInternalValue(statement.ColumnInt64(6)); 93 base::TimeDelta::FromInternalValue(statement.ColumnInt64(6));
94 } 94 }
95 95
96 // static 96 // static
97 bool VisitDatabase::FillVisitVector(sql::Statement& statement, 97 bool VisitDatabase::FillVisitVector(sql::Statement& statement,
98 VisitVector* visits) { 98 VisitVector* visits) {
99 if (!statement.is_valid()) 99 if (!statement.is_valid())
100 return false; 100 return false;
101 101
102 while (statement.Step()) { 102 while (statement.Step()) {
103 history::VisitRow visit; 103 VisitRow visit;
104 FillVisitRow(statement, &visit); 104 FillVisitRow(statement, &visit);
105 visits->push_back(visit); 105 visits->push_back(visit);
106 } 106 }
107 107
108 return statement.Succeeded(); 108 return statement.Succeeded();
109 } 109 }
110 110
111 // static 111 // static
112 bool VisitDatabase::FillVisitVectorWithOptions(sql::Statement& statement, 112 bool VisitDatabase::FillVisitVectorWithOptions(sql::Statement& statement,
113 const QueryOptions& options, 113 const QueryOptions& options,
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 while (statement.Step()) { 616 while (statement.Step()) {
617 BriefVisitInfo info; 617 BriefVisitInfo info;
618 info.url_id = statement.ColumnInt64(0); 618 info.url_id = statement.ColumnInt64(0);
619 info.time = base::Time::FromInternalValue(statement.ColumnInt64(1)); 619 info.time = base::Time::FromInternalValue(statement.ColumnInt64(1));
620 info.transition = ui::PageTransitionFromInt(statement.ColumnInt(2)); 620 info.transition = ui::PageTransitionFromInt(statement.ColumnInt(2));
621 result_vector->push_back(info); 621 result_vector->push_back(info);
622 } 622 }
623 } 623 }
624 624
625 } // namespace history 625 } // namespace history
OLDNEW
« no previous file with comments | « components/history/core/browser/url_database.cc ('k') | components/history/core/browser/visit_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698