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 "chrome/browser/history/android/sql_handler.h" 6 7namespace history { 8 9TableIDRow::TableIDRow() 10 : url_id(0), 11 bookmarked(false) { 12} 13 14TableIDRow::~TableIDRow() { 15} 16 17SQLHandler::SQLHandler(const HistoryAndBookmarkRow::ColumnID columns[], 18 int column_count) 19 : columns_(columns, columns + column_count) { 20} 21 22SQLHandler::~SQLHandler() { 23} 24 25bool 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 34bool SQLHandler::HasColumn(HistoryAndBookmarkRow::ColumnID id) { 35 return columns_.find(id) != columns_.end(); 36} 37 38} // namespace history. 39