diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 21:27:45 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 21:27:45 +0000 |
commit | 778cb2f49af834951ab17e95c9143c313e5bf1a2 (patch) | |
tree | 8d3c27c95cb8dcd0fd43576fe2a5d85793c11279 /chrome/browser | |
parent | a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd (diff) | |
download | chromium_src-778cb2f49af834951ab17e95c9143c313e5bf1a2.zip chromium_src-778cb2f49af834951ab17e95c9143c313e5bf1a2.tar.gz chromium_src-778cb2f49af834951ab17e95c9143c313e5bf1a2.tar.bz2 |
Rollback "Remove use of wide characters in stats table identifiers."
This reverts commit r5847.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5850 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database_bloom.cc | 16 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database_impl.cc | 22 |
2 files changed, 19 insertions, 19 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc index 8990784..ff709c7 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc @@ -444,7 +444,7 @@ void SafeBrowsingDatabaseBloom::UpdateFinished(bool update_succeeded) { } void SafeBrowsingDatabaseBloom::InsertAdd(SBPrefix host, SBEntry* entry) { - STATS_COUNTER("SB.HostInsert", 1); + STATS_COUNTER(L"SB.HostInsert", 1); int encoded = EncodeChunkId(entry->chunk_id(), entry->list_id()); if (entry->type() == SBEntry::ADD_FULL_HASH) { @@ -473,7 +473,7 @@ void SafeBrowsingDatabaseBloom::InsertAdd(SBPrefix host, SBEntry* entry) { void SafeBrowsingDatabaseBloom::InsertAddPrefix(SBPrefix prefix, int encoded_chunk) { - STATS_COUNTER("SB.PrefixAdd", 1); + STATS_COUNTER(L"SB.PrefixAdd", 1); std::string sql = "INSERT INTO add_prefix (chunk, prefix) VALUES (?, ?)"; SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, sql.c_str()); if (!statement.is_valid()) { @@ -496,7 +496,7 @@ void SafeBrowsingDatabaseBloom::InsertAddFullHash(SBPrefix prefix, int encoded_chunk, base::Time receive_time, SBFullHash full_prefix) { - STATS_COUNTER("SB.PrefixAddFull", 1); + STATS_COUNTER(L"SB.PrefixAddFull", 1); std::string sql = "INSERT INTO add_full_hash " "(chunk, prefix, receive_time, full_hash) " "VALUES (?,?,?,?)"; @@ -521,7 +521,7 @@ void SafeBrowsingDatabaseBloom::InsertAddFullHash(SBPrefix prefix, void SafeBrowsingDatabaseBloom::InsertSub( int chunk_id, SBPrefix host, SBEntry* entry) { - STATS_COUNTER("SB.HostDelete", 1); + STATS_COUNTER(L"SB.HostDelete", 1); int encoded = EncodeChunkId(chunk_id, entry->list_id()); int encoded_add; @@ -553,7 +553,7 @@ void SafeBrowsingDatabaseBloom::InsertSub( void SafeBrowsingDatabaseBloom::InsertSubPrefix(SBPrefix prefix, int encoded_chunk, int encoded_add_chunk) { - STATS_COUNTER("SB.PrefixSub", 1); + STATS_COUNTER(L"SB.PrefixSub", 1); std::string sql = "INSERT INTO sub_prefix (chunk, add_chunk, prefix) VALUES (?,?,?)"; SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, sql.c_str()); @@ -578,7 +578,7 @@ void SafeBrowsingDatabaseBloom::InsertSubFullHash(SBPrefix prefix, int encoded_add_chunk, SBFullHash full_prefix, bool use_temp_table) { - STATS_COUNTER("SB.PrefixSubFull", 1); + STATS_COUNTER(L"SB.PrefixSubFull", 1); std::string sql = "INSERT INTO "; if (use_temp_table) { sql += "sub_full_tmp"; @@ -661,7 +661,7 @@ void SafeBrowsingDatabaseBloom::DeleteChunks( bool SafeBrowsingDatabaseBloom::ChunkExists(int list_id, ChunkType type, int chunk_id) { - STATS_COUNTER("SB.ChunkSelect", 1); + STATS_COUNTER(L"SB.ChunkSelect", 1); int encoded = EncodeChunkId(chunk_id, list_id); bool ret; if (type == ADD_CHUNK) @@ -869,7 +869,7 @@ int SafeBrowsingDatabaseBloom::PairCompare(const void* arg1, const void* arg2) { bool SafeBrowsingDatabaseBloom::BuildAddPrefixList(SBPair* adds) { // Read add_prefix into memory and sort it. - STATS_COUNTER("SB.HostSelectForBloomFilter", 1); + STATS_COUNTER(L"SB.HostSelectForBloomFilter", 1); SQLITE_UNIQUE_STATEMENT(add_prefix, *statement_cache_, "SELECT chunk, prefix FROM add_prefix"); if (!add_prefix.is_valid()) { diff --git a/chrome/browser/safe_browsing/safe_browsing_database_impl.cc b/chrome/browser/safe_browsing/safe_browsing_database_impl.cc index 6b5e43f..34adc83 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_impl.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_impl.cc @@ -362,7 +362,7 @@ void SafeBrowsingDatabaseImpl::CheckUrl(const std::string& host, bool SafeBrowsingDatabaseImpl::ReadInfo(int host_key, SBHostInfo* info, int* id) { - STATS_COUNTER("SB.HostSelect", 1); + STATS_COUNTER(L"SB.HostSelect", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "SELECT id, entries FROM hosts WHERE host=?"); if (!statement.is_valid()) { @@ -416,9 +416,9 @@ void SafeBrowsingDatabaseImpl::WriteInfo(int host_key, int start_index = 0; if (id != 0) { statement->bind_int(start_index++, id); - STATS_COUNTER("SB.HostReplace", 1); + STATS_COUNTER(L"SB.HostReplace", 1); } else { - STATS_COUNTER("SB.HostInsert", 1); + STATS_COUNTER(L"SB.HostInsert", 1); } statement->bind_int(start_index++, host_key); @@ -433,7 +433,7 @@ void SafeBrowsingDatabaseImpl::WriteInfo(int host_key, } void SafeBrowsingDatabaseImpl::DeleteInfo(int host_key) { - STATS_COUNTER("SB.HostDelete", 1); + STATS_COUNTER(L"SB.HostDelete", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "DELETE FROM hosts WHERE host=?"); if (!statement.is_valid()) { @@ -694,7 +694,7 @@ void SafeBrowsingDatabaseImpl::DeleteChunks( void SafeBrowsingDatabaseImpl::AddDel(const std::string& list_name, int add_chunk_id) { - STATS_COUNTER("SB.ChunkSelect", 1); + STATS_COUNTER(L"SB.ChunkSelect", 1); int list_id = GetListID(list_name); // Find all the prefixes that came from the given add_chunk_id. SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, @@ -767,7 +767,7 @@ void SafeBrowsingDatabaseImpl::SubDel(const std::string& list_name, void SafeBrowsingDatabaseImpl::AddChunkInformation( int list_id, ChunkType type, int chunk_id, const std::string& hostkeys) { - STATS_COUNTER("SB.ChunkInsert", 1); + STATS_COUNTER(L"SB.ChunkInsert", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "INSERT INTO chunks (list_id, chunk_type, chunk_id, hostkeys) " "VALUES (?,?,?,?)"); @@ -817,7 +817,7 @@ void SafeBrowsingDatabaseImpl::GetChunkIds(int list_id, ChunkType type, std::string* list) { list->clear(); - STATS_COUNTER("SB.ChunkSelect", 1); + STATS_COUNTER(L"SB.ChunkSelect", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "SELECT chunk_id FROM chunks WHERE list_id=? AND chunk_type=? " "ORDER BY chunk_id"); @@ -849,7 +849,7 @@ void SafeBrowsingDatabaseImpl::GetChunkIds(int list_id, bool SafeBrowsingDatabaseImpl::ChunkExists(int list_id, ChunkType type, int chunk_id) { - STATS_COUNTER("SB.ChunkSelect", 1); + STATS_COUNTER(L"SB.ChunkSelect", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "SELECT chunk_id FROM chunks WHERE" " list_id=? AND chunk_type=? AND chunk_id=?"); @@ -873,7 +873,7 @@ void SafeBrowsingDatabaseImpl::RemoveChunkId(int list_id, ChunkType type, int chunk_id) { // Also remove the add chunk id from add_chunks - STATS_COUNTER("SB.ChunkDelete", 1); + STATS_COUNTER(L"SB.ChunkDelete", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "DELETE FROM chunks WHERE list_id=? AND chunk_type=? AND chunk_id=?"); if (!statement.is_valid()) { @@ -985,7 +985,7 @@ void SafeBrowsingDatabaseImpl::BuildBloomFilter() { void SafeBrowsingDatabaseImpl::OnReadHostKeys(int start_id) { // Since reading all the keys in one go could take > 20 seconds, instead we // read them in small chunks. - STATS_COUNTER("SB.HostSelectForBloomFilter", 1); + STATS_COUNTER(L"SB.HostSelectForBloomFilter", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "SELECT host,id FROM hosts WHERE id > ? ORDER BY id"); if (!statement.is_valid()) { @@ -1077,7 +1077,7 @@ void SafeBrowsingDatabaseImpl::BeginTransaction() { void SafeBrowsingDatabaseImpl::EndTransaction() { if (--transaction_count_ == 0) { if (transaction_.get() != NULL) { - STATS_COUNTER("SB.TransactionCommit", 1); + STATS_COUNTER(L"SB.TransactionCommit", 1); transaction_->Commit(); transaction_.reset(); } |