diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 05:47:15 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 05:47:15 +0000 |
commit | c870c76357fc05d3f7181f8121181f983bd25e7f (patch) | |
tree | 4757d379e295e2a594e63d53a0d3b4fe51c77379 /chrome/browser/safe_browsing/safe_browsing_database_bloom.cc | |
parent | 0b88baec73430cb25a4d6181b47c221f99fe5d0f (diff) | |
download | chromium_src-c870c76357fc05d3f7181f8121181f983bd25e7f.zip chromium_src-c870c76357fc05d3f7181f8121181f983bd25e7f.tar.gz chromium_src-c870c76357fc05d3f7181f8121181f983bd25e7f.tar.bz2 |
Safe browsing cleanup:
* wstring -> FilePath
* create versions of WriteFile/ReadFile with FilePath signatures
Review URL: http://codereview.chromium.org/19610
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8797 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_database_bloom.cc')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database_bloom.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc index 44636f3..996cb52 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc @@ -42,7 +42,8 @@ static const int kOnResumeHoldupMs = 5 * 60 * 1000; // 5 minutes. static const int kMaxStalenessMinutes = 45; // The bloom filter based file name suffix. -static const wchar_t kBloomFilterFileSuffix[] = L" Bloom"; +static const FilePath::CharType kBloomFilterFileSuffix[] = + FILE_PATH_LITERAL(" Bloom"); // Implementation -------------------------------------------------------------- @@ -60,11 +61,11 @@ SafeBrowsingDatabaseBloom::~SafeBrowsingDatabaseBloom() { Close(); } -bool SafeBrowsingDatabaseBloom::Init(const std::wstring& filename, +bool SafeBrowsingDatabaseBloom::Init(const FilePath& filename, Callback0::Type* chunk_inserted_callback) { DCHECK(!init_ && filename_.empty()); - filename_ = filename + kBloomFilterFileSuffix; + filename_ = FilePath(filename.value() + kBloomFilterFileSuffix); bloom_filter_filename_ = BloomFilterFilename(filename_); hash_cache_.reset(new HashCache); @@ -111,7 +112,7 @@ bool SafeBrowsingDatabaseBloom::Open() { if (db_) return true; - if (sqlite3_open(WideToUTF8(filename_).c_str(), &db_) != SQLITE_OK) { + if (OpenSqliteDb(filename_, &db_) != SQLITE_OK) { sqlite3_close(db_); db_ = NULL; return false; |