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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_database_bloom.cc

Issue 19610: Safe browsing cleanup:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_database_bloom.cc (revision 8772)
+++ chrome/browser/safe_browsing/safe_browsing_database_bloom.cc (working copy)
@@ -42,7 +42,8 @@
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 @@
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 @@
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;

Powered by Google App Engine
This is Rietveld 408576698