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

Side by Side Diff: components/history/core/android/sql_handler.cc

Issue 849323002: Componentize HistoryDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android compilation Created 5 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/history/core/android/sql_handler.h"
6
7 namespace history {
8
9 TableIDRow::TableIDRow()
10 : url_id(0),
11 bookmarked(false) {
12 }
13
14 TableIDRow::~TableIDRow() {
15 }
16
17 SQLHandler::SQLHandler(const HistoryAndBookmarkRow::ColumnID columns[],
18 int column_count)
19 : columns_(columns, columns + column_count) {
20 }
21
22 SQLHandler::~SQLHandler() {
23 }
24
25 bool SQLHandler::HasColumnIn(const HistoryAndBookmarkRow& row) {
26 for (std::set<HistoryAndBookmarkRow::ColumnID>::const_iterator i =
27 columns_.begin(); i != columns_.end(); ++i) {
28 if (row.is_value_set_explicitly(*i))
29 return true;
30 }
31 return false;
32 }
33
34 bool SQLHandler::HasColumn(HistoryAndBookmarkRow::ColumnID id) {
35 return columns_.find(id) != columns_.end();
36 }
37
38 } // namespace history.
OLDNEW
« no previous file with comments | « components/history/core/android/sql_handler.h ('k') | components/history/core/android/urls_sql_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698