summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/url_database.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-05 20:37:56 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-05 20:37:56 +0000
commita6fbcd2eeb0375622dfe20eb45f70fdf9eff43bc (patch)
tree1258fe70e6e319337de3d3461357fb6a0415ba3d /chrome/browser/history/url_database.cc
parenta25097e91f9a65ceecf729fe630880be3cddf05b (diff)
downloadchromium_src-a6fbcd2eeb0375622dfe20eb45f70fdf9eff43bc.zip
chromium_src-a6fbcd2eeb0375622dfe20eb45f70fdf9eff43bc.tar.gz
chromium_src-a6fbcd2eeb0375622dfe20eb45f70fdf9eff43bc.tar.bz2
Don't crash when getting strings out of the database. column_text is a little dangerous because it can return NULL. Most STL string stuff can't handle this. I changed the uses to column_string() which handles NULL properly and generates STL strings for us.
BUG=3770 Review URL: http://codereview.chromium.org/9189 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/url_database.cc')
-rw-r--r--chrome/browser/history/url_database.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/history/url_database.cc b/chrome/browser/history/url_database.cc
index b8bf2c9..c824a6e 100644
--- a/chrome/browser/history/url_database.cc
+++ b/chrome/browser/history/url_database.cc
@@ -44,8 +44,8 @@ std::string URLDatabase::GURLToDatabaseURL(const GURL& gurl) {
void URLDatabase::FillURLRow(SQLStatement& s, history::URLRow* i) {
DCHECK(i);
i->id_ = s.column_int64(0);
- i->url_ = GURL(s.column_text(1));
- i->title_.assign(s.column_text16(2));
+ i->url_ = GURL(s.column_string(1));
+ i->title_ = s.column_string16(2);
i->visit_count_ = s.column_int(3);
i->typed_count_ = s.column_int(4);
i->last_visit_ = Time::FromInternalValue(s.column_int64(5));