Index: components/history/core/browser/url_database.cc |
diff --git a/components/history/core/browser/url_database.cc b/components/history/core/browser/url_database.cc |
index 65ac67e8e9717e9a5f8511b7fd3d7d0e2b5e4a95..024bea27b3a8a1f1e4e940c8241b660a6c08cafc 100644 |
--- a/components/history/core/browser/url_database.cc |
+++ b/components/history/core/browser/url_database.cc |
@@ -68,7 +68,8 @@ void URLDatabase::FillURLRow(sql::Statement& s, URLRow* i) { |
i->visit_count_ = s.ColumnInt(3); |
i->typed_count_ = s.ColumnInt(4); |
i->last_visit_ = base::Time::FromInternalValue(s.ColumnInt64(5)); |
- i->hidden_ = s.ColumnInt(6) != 0; |
+ i->context_ = static_cast<history::HistoryContext>(s.ColumnInt(6)); |
+ i->hidden_ = s.ColumnInt(7) != 0; |
} |
bool URLDatabase::GetURLRow(URLID url_id, URLRow* info) { |
@@ -115,15 +116,16 @@ URLID URLDatabase::GetRowForURL(const GURL& url, URLRow* info) { |
bool URLDatabase::UpdateURLRow(URLID url_id, const URLRow& info) { |
sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE, |
- "UPDATE urls SET title=?,visit_count=?,typed_count=?,last_visit_time=?," |
+ "UPDATE urls SET title=?,visit_count=?,typed_count=?,last_visit_time=?,context=?," |
"hidden=?" |
"WHERE id=?")); |
statement.BindString16(0, info.title()); |
statement.BindInt(1, info.visit_count()); |
statement.BindInt(2, info.typed_count()); |
statement.BindInt64(3, info.last_visit().ToInternalValue()); |
- statement.BindInt(4, info.hidden() ? 1 : 0); |
- statement.BindInt64(5, url_id); |
+ statement.BindInt(4, info.context()); |
+ statement.BindInt(5, info.hidden() ? 1 : 0); |
+ statement.BindInt64(6, url_id); |
return statement.Run() && GetDB().GetLastChangeCount() > 0; |
} |
@@ -603,6 +605,7 @@ bool URLDatabase::CreateURLTable(bool is_temporary) { |
"visit_count INTEGER DEFAULT 0 NOT NULL," |
"typed_count INTEGER DEFAULT 0 NOT NULL," |
"last_visit_time INTEGER NOT NULL," |
+ "context INTEGER DEFAULT 0 NOT NULL," |
"hidden INTEGER DEFAULT 0 NOT NULL," |
"favicon_id INTEGER DEFAULT 0 NOT NULL)"); // favicon_id is not used now. |