diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-22 00:37:21 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-22 00:37:21 +0000 |
commit | 7a1c5ab3654723cfe4489e6981dcd67da1489f3f (patch) | |
tree | fca8c695a824dd834b95c29b5f618f6673066a5f /chrome | |
parent | f5eddaf87e378c29412a028e027f91d48fbab551 (diff) | |
download | chromium_src-7a1c5ab3654723cfe4489e6981dcd67da1489f3f.zip chromium_src-7a1c5ab3654723cfe4489e6981dcd67da1489f3f.tar.gz chromium_src-7a1c5ab3654723cfe4489e6981dcd67da1489f3f.tar.bz2 |
Remove use of wide characters in stats table identifiers.
Review URL: http://codereview.chromium.org/11544
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser_about_handler.cc | 22 | ||||
-rw-r--r-- | chrome/browser/jankometer.cc | 20 | ||||
-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 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database_unittest.cc | 27 | ||||
-rw-r--r-- | chrome/browser/task_manager.cc | 9 | ||||
-rw-r--r-- | chrome/common/chrome_constants.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_constants.h | 2 | ||||
-rw-r--r-- | chrome/common/chrome_counters.cc | 14 | ||||
-rw-r--r-- | chrome/renderer/net/render_dns_queue.cc | 4 | ||||
-rw-r--r-- | chrome/test/unit/chrome_test_suite.h | 2 |
11 files changed, 69 insertions, 73 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 2beeffb..4922118 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -383,17 +383,17 @@ std::string BrowserAboutHandler::AboutStats() { // NOTE: Counters start at index 1. for (int index = 1; index <= table->GetMaxCounters(); index++) { // Get the counter's full name - std::wstring full_name = table->GetRowName(index); + std::string full_name = table->GetRowName(index); if (full_name.length() == 0) break; - DCHECK(full_name[1] == L':'); - wchar_t counter_type = full_name[0]; - std::wstring name = full_name.substr(2); + DCHECK(full_name[1] == ':'); + char counter_type = full_name[0]; + std::string name = full_name.substr(2); // JSON doesn't allow '.' in names. size_t pos; - while ( ( pos = name.find(L".") ) != -1 ) - name.replace(pos, 1, L":"); + while ((pos = name.find(".")) != -1) + name.replace(pos, 1, ":"); // Try to see if this name already exists. DictionaryValue* counter = NULL; @@ -403,7 +403,7 @@ std::string BrowserAboutHandler::AboutStats() { if (counters->GetDictionary(scan_index, &dictionary)) { std::wstring scan_name; if (dictionary->GetString(L"name", &scan_name) && - scan_name == name) { + WideToASCII(scan_name) == name) { counter = dictionary; } } else { @@ -413,12 +413,12 @@ std::string BrowserAboutHandler::AboutStats() { if (counter == NULL) { counter = new DictionaryValue(); - counter->SetString(L"name", name); + counter->SetString(L"name", ASCIIToWide(name)); counters->Append(counter); } switch (counter_type) { - case L'c': + case 'c': { int new_value = table->GetRowValue(index); int prior_value = 0; @@ -430,12 +430,12 @@ std::string BrowserAboutHandler::AboutStats() { counter->SetInteger(L"delta", delta); } break; - case L'm': + case 'm': { // TODO(mbelshe): implement me. } break; - case L't': + case 't': { int time = table->GetRowValue(index); counter->SetInteger(L"time", time); diff --git a/chrome/browser/jankometer.cc b/chrome/browser/jankometer.cc index d67f51c..9247484 100644 --- a/chrome/browser/jankometer.cc +++ b/chrome/browser/jankometer.cc @@ -51,7 +51,7 @@ const bool kPlaySounds = false; class JankWatchdog : public Watchdog { public: JankWatchdog(const TimeDelta& duration, - const std::wstring& thread_watched_name, + const std::string& thread_watched_name, bool enabled) : Watchdog(duration, thread_watched_name, enabled), thread_name_watched_(thread_watched_name), @@ -68,7 +68,7 @@ class JankWatchdog : public Watchdog { } private: - std::wstring thread_name_watched_; + std::string thread_name_watched_; int alarm_count_; DISALLOW_EVIL_CONSTRUCTORS(JankWatchdog); @@ -78,17 +78,17 @@ class JankWatchdog : public Watchdog { class JankObserver : public base::RefCountedThreadSafe<JankObserver>, public MessageLoopForUI::Observer { public: - JankObserver(const wchar_t* thread_name, + JankObserver(const char* thread_name, const TimeDelta& excessive_duration, bool watchdog_enable) : MaxMessageDelay_(excessive_duration), - slow_processing_counter_(std::wstring(L"Chrome.SlowMsg") + thread_name), - queueing_delay_counter_(std::wstring(L"Chrome.DelayMsg") + thread_name), + slow_processing_counter_(std::string("Chrome.SlowMsg") + thread_name), + queueing_delay_counter_(std::string("Chrome.DelayMsg") + thread_name), process_times_((std::wstring(L"Chrome.ProcMsgL ") - + thread_name).c_str(), 1, 3600000, 50), + + ASCIIToWide(thread_name)).c_str(), 1, 3600000, 50), total_times_((std::wstring(L"Chrome.TotalMsgL ") - + thread_name).c_str(), 1, 3600000, 50), - total_time_watchdog_(excessive_duration, std::wstring(thread_name), + + ASCIIToWide(thread_name)).c_str(), 1, 3600000, 50), + total_time_watchdog_(excessive_duration, ASCIIToWide(thread_name), watchdog_enable) { process_times_.SetFlags(kUmaTargetedHistogramFlag); total_times_.SetFlags(kUmaTargetedHistogramFlag); @@ -192,7 +192,7 @@ void InstallJankometer(const CommandLine &parsed_command_line) { // Install on the UI thread. ui_observer = new JankObserver( - L"UI", + "UI", TimeDelta::FromMilliseconds(kMaxUIMessageDelayMs), ui_watchdog_enabled); ui_observer->AddRef(); @@ -202,7 +202,7 @@ void InstallJankometer(const CommandLine &parsed_command_line) { // interaction with web pages. We must proxy to that thread before we can // add our observer. io_observer = new JankObserver( - L"IO", + "IO", TimeDelta::FromMilliseconds(kMaxIOMessageDelayMs), io_watchdog_enabled); io_observer->AddRef(); diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc index f7eaeeb..6f2740f 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc @@ -441,7 +441,7 @@ void SafeBrowsingDatabaseBloom::UpdateFinished(bool update_succeeded) { } void SafeBrowsingDatabaseBloom::InsertAdd(SBPrefix host, SBEntry* entry) { - STATS_COUNTER(L"SB.HostInsert", 1); + STATS_COUNTER("SB.HostInsert", 1); int encoded = EncodeChunkId(entry->chunk_id(), entry->list_id()); if (entry->type() == SBEntry::ADD_FULL_HASH) { @@ -470,7 +470,7 @@ void SafeBrowsingDatabaseBloom::InsertAdd(SBPrefix host, SBEntry* entry) { void SafeBrowsingDatabaseBloom::InsertAddPrefix(SBPrefix prefix, int encoded_chunk) { - STATS_COUNTER(L"SB.PrefixAdd", 1); + STATS_COUNTER("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()) { @@ -493,7 +493,7 @@ void SafeBrowsingDatabaseBloom::InsertAddFullHash(SBPrefix prefix, int encoded_chunk, base::Time receive_time, SBFullHash full_prefix) { - STATS_COUNTER(L"SB.PrefixAddFull", 1); + STATS_COUNTER("SB.PrefixAddFull", 1); std::string sql = "INSERT INTO add_full_hash " "(chunk, prefix, receive_time, full_hash) " "VALUES (?,?,?,?)"; @@ -518,7 +518,7 @@ void SafeBrowsingDatabaseBloom::InsertAddFullHash(SBPrefix prefix, void SafeBrowsingDatabaseBloom::InsertSub( int chunk_id, SBPrefix host, SBEntry* entry) { - STATS_COUNTER(L"SB.HostDelete", 1); + STATS_COUNTER("SB.HostDelete", 1); int encoded = EncodeChunkId(chunk_id, entry->list_id()); int encoded_add; @@ -550,7 +550,7 @@ void SafeBrowsingDatabaseBloom::InsertSub( void SafeBrowsingDatabaseBloom::InsertSubPrefix(SBPrefix prefix, int encoded_chunk, int encoded_add_chunk) { - STATS_COUNTER(L"SB.PrefixSub", 1); + STATS_COUNTER("SB.PrefixSub", 1); std::string sql = "INSERT INTO sub_prefix (chunk, add_chunk, prefix) VALUES (?,?,?)"; SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, sql.c_str()); @@ -575,7 +575,7 @@ void SafeBrowsingDatabaseBloom::InsertSubFullHash(SBPrefix prefix, int encoded_add_chunk, SBFullHash full_prefix, bool use_temp_table) { - STATS_COUNTER(L"SB.PrefixSubFull", 1); + STATS_COUNTER("SB.PrefixSubFull", 1); std::string sql = "INSERT INTO "; if (use_temp_table) { sql += "sub_full_tmp"; @@ -658,7 +658,7 @@ void SafeBrowsingDatabaseBloom::DeleteChunks( bool SafeBrowsingDatabaseBloom::ChunkExists(int list_id, ChunkType type, int chunk_id) { - STATS_COUNTER(L"SB.ChunkSelect", 1); + STATS_COUNTER("SB.ChunkSelect", 1); int encoded = EncodeChunkId(chunk_id, list_id); bool ret; if (type == ADD_CHUNK) @@ -866,7 +866,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(L"SB.HostSelectForBloomFilter", 1); + STATS_COUNTER("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 6d61fd9..47c0e85 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(L"SB.HostSelect", 1); + STATS_COUNTER("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(L"SB.HostReplace", 1); + STATS_COUNTER("SB.HostReplace", 1); } else { - STATS_COUNTER(L"SB.HostInsert", 1); + STATS_COUNTER("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(L"SB.HostDelete", 1); + STATS_COUNTER("SB.HostDelete", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "DELETE FROM hosts WHERE host=?"); if (!statement.is_valid()) { @@ -704,7 +704,7 @@ void SafeBrowsingDatabaseImpl::DeleteChunks( void SafeBrowsingDatabaseImpl::AddDel(const std::string& list_name, int add_chunk_id) { - STATS_COUNTER(L"SB.ChunkSelect", 1); + STATS_COUNTER("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_, @@ -777,7 +777,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(L"SB.ChunkInsert", 1); + STATS_COUNTER("SB.ChunkInsert", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "INSERT INTO chunks (list_id, chunk_type, chunk_id, hostkeys) " "VALUES (?,?,?,?)"); @@ -827,7 +827,7 @@ void SafeBrowsingDatabaseImpl::GetChunkIds(int list_id, ChunkType type, std::string* list) { list->clear(); - STATS_COUNTER(L"SB.ChunkSelect", 1); + STATS_COUNTER("SB.ChunkSelect", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "SELECT chunk_id FROM chunks WHERE list_id=? AND chunk_type=? " "ORDER BY chunk_id"); @@ -859,7 +859,7 @@ void SafeBrowsingDatabaseImpl::GetChunkIds(int list_id, bool SafeBrowsingDatabaseImpl::ChunkExists(int list_id, ChunkType type, int chunk_id) { - STATS_COUNTER(L"SB.ChunkSelect", 1); + STATS_COUNTER("SB.ChunkSelect", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "SELECT chunk_id FROM chunks WHERE" " list_id=? AND chunk_type=? AND chunk_id=?"); @@ -883,7 +883,7 @@ void SafeBrowsingDatabaseImpl::RemoveChunkId(int list_id, ChunkType type, int chunk_id) { // Also remove the add chunk id from add_chunks - STATS_COUNTER(L"SB.ChunkDelete", 1); + STATS_COUNTER("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()) { @@ -995,7 +995,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(L"SB.HostSelectForBloomFilter", 1); + STATS_COUNTER("SB.HostSelectForBloomFilter", 1); SQLITE_UNIQUE_STATEMENT(statement, *statement_cache_, "SELECT host,id FROM hosts WHERE id > ? ORDER BY id"); if (!statement.is_valid()) { @@ -1087,7 +1087,7 @@ void SafeBrowsingDatabaseImpl::BeginTransaction() { void SafeBrowsingDatabaseImpl::EndTransaction() { if (--transaction_count_ == 0) { if (transaction_.get() != NULL) { - STATS_COUNTER(L"SB.TransactionCommit", 1); + STATS_COUNTER("SB.TransactionCommit", 1); transaction_->Commit(); transaction_.reset(); } diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc index 15d437a..d63b131 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc @@ -1011,14 +1011,9 @@ TEST(SafeBrowsingDatabase, HashCaching) { TearDownTestDatabase(database); } -void PrintStat(const wchar_t* name) { -#if defined(OS_WIN) +void PrintStat(const char* name) { int value = StatsTable::current()->GetCounterValue(name); - LOG(INFO) << StringPrintf(L"%ls %d", name, value); -#else - // TODO(port): Enable when StatsTable is ported. - NOTIMPLEMENTED(); -#endif + LOG(INFO) << StringPrintf("%s %d", name, value); } std::wstring GetFullSBDataPath(const std::wstring& path) { @@ -1096,15 +1091,15 @@ void PeformUpdate(const std::wstring& initial_db, (Time::Now() - before_time).InMilliseconds()); #endif - PrintStat(L"c:SB.HostSelect"); - PrintStat(L"c:SB.HostSelectForBloomFilter"); - PrintStat(L"c:SB.HostReplace"); - PrintStat(L"c:SB.HostInsert"); - PrintStat(L"c:SB.HostDelete"); - PrintStat(L"c:SB.ChunkSelect"); - PrintStat(L"c:SB.ChunkInsert"); - PrintStat(L"c:SB.ChunkDelete"); - PrintStat(L"c:SB.TransactionCommit"); + PrintStat("c:SB.HostSelect"); + PrintStat("c:SB.HostSelectForBloomFilter"); + PrintStat("c:SB.HostReplace"); + PrintStat("c:SB.HostInsert"); + PrintStat("c:SB.HostDelete"); + PrintStat("c:SB.ChunkSelect"); + PrintStat("c:SB.ChunkInsert"); + PrintStat("c:SB.ChunkDelete"); + PrintStat("c:SB.TransactionCommit"); delete database; } diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc index 009d44c..423a55f 100644 --- a/chrome/browser/task_manager.cc +++ b/chrome/browser/task_manager.cc @@ -201,7 +201,7 @@ int TaskManagerTableModel::GetStatsValue(TaskManager::Resource* resource, int col_id) { StatsTable* table = StatsTable::current(); if (table != NULL) { - const wchar_t* counter = table->GetRowName(col_id); + const char* counter = table->GetRowName(col_id); if (counter != NULL && counter[0] != '\0') { return table->GetCounterValue(counter, base::GetProcId(resource->GetProcess())); @@ -783,14 +783,15 @@ void TaskManagerContents::UpdateStatsCounters() { int max = stats->GetMaxCounters(); // skip the first row (it's header data) for (int i = 1; i < max; i++) { - const wchar_t* row = stats->GetRowName(i); - if (row != NULL && row[0] != L'\0' && !tab_table_->HasColumn(i)) { + const char* row = stats->GetRowName(i); + if (row != NULL && row[0] != '\0' && !tab_table_->HasColumn(i)) { // TODO(erikkay): Use l10n to get display names for stats. Right // now we're just displaying the internal counter name. Perhaps // stat names not in the string table would be filtered out. // TODO(erikkay): Width is hard-coded right now, so many column // names are clipped. - views::TableColumn col(i, row, views::TableColumn::RIGHT, 90, 0); + views::TableColumn col(i, ASCIIToWide(row), views::TableColumn::RIGHT, + 90, 0); col.sortable = true; columns_.push_back(col); tab_table_->AddColumn(col); diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc index 57749a1..b7e9eec 100644 --- a/chrome/common/chrome_constants.cc +++ b/chrome/common/chrome_constants.cc @@ -10,10 +10,10 @@ namespace chrome { const wchar_t kBrowserProcessExecutableName[] = L"chrome.exe"; #if defined(GOOGLE_CHROME_BUILD) const wchar_t kBrowserAppName[] = L"Chrome"; -const wchar_t kStatsFilename[] = L"ChromeStats"; +const char kStatsFilename[] = "ChromeStats"; #else const wchar_t kBrowserAppName[] = L"Chromium"; -const wchar_t kStatsFilename[] = L"ChromiumStats"; +const char kStatsFilename[] = "ChromiumStats"; #endif const wchar_t kExternalTabWindowClass[] = L"Chrome_ExternalTabContainer"; const wchar_t kMessageWindowClass[] = L"Chrome_MessageWindow"; diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h index 46fa329..a838699 100644 --- a/chrome/common/chrome_constants.h +++ b/chrome/common/chrome_constants.h @@ -17,7 +17,7 @@ extern const wchar_t kCrashReportLog[]; extern const wchar_t kTestingInterfaceDLL[]; extern const wchar_t kNotSignedInProfile[]; extern const wchar_t kNotSignedInID[]; -extern const wchar_t kStatsFilename[]; +extern const char kStatsFilename[]; extern const wchar_t kBrowserResourcesDll[]; // filenames diff --git a/chrome/common/chrome_counters.cc b/chrome/common/chrome_counters.cc index 9ac86b8..1e91528 100644 --- a/chrome/common/chrome_counters.cc +++ b/chrome/common/chrome_counters.cc @@ -20,37 +20,37 @@ namespace chrome { // would be it. But these are small objects, so this is ok. StatsCounter& Counters::ipc_send_counter() { - static StatsCounter* ctr = new StatsCounter(L"IPC.SendMsgCount"); + static StatsCounter* ctr = new StatsCounter("IPC.SendMsgCount"); return *ctr; } StatsCounterTimer& Counters::chrome_main() { - static StatsCounterTimer* ctr = new StatsCounterTimer(L"Chrome.Init"); + static StatsCounterTimer* ctr = new StatsCounterTimer("Chrome.Init"); return *ctr; } StatsCounterTimer& Counters::renderer_main() { - static StatsCounterTimer* ctr = new StatsCounterTimer(L"Chrome.RendererInit"); + static StatsCounterTimer* ctr = new StatsCounterTimer("Chrome.RendererInit"); return *ctr; } StatsCounterTimer& Counters::spellcheck_init() { - static StatsCounterTimer* ctr = new StatsCounterTimer(L"SpellCheck.Init"); + static StatsCounterTimer* ctr = new StatsCounterTimer("SpellCheck.Init"); return *ctr; } StatsRate& Counters::spellcheck_lookup() { - static StatsRate* ctr = new StatsRate(L"SpellCheck.Lookup"); + static StatsRate* ctr = new StatsRate("SpellCheck.Lookup"); return *ctr; } StatsCounterTimer& Counters::plugin_load() { - static StatsCounterTimer* ctr = new StatsCounterTimer(L"ChromePlugin.Load"); + static StatsCounterTimer* ctr = new StatsCounterTimer("ChromePlugin.Load"); return *ctr; } StatsRate& Counters::plugin_intercept() { - static StatsRate* ctr = new StatsRate(L"ChromePlugin.Intercept"); + static StatsRate* ctr = new StatsRate("ChromePlugin.Intercept"); return *ctr; } diff --git a/chrome/renderer/net/render_dns_queue.cc b/chrome/renderer/net/render_dns_queue.cc index 5a0b15e0..94c0ea0 100644 --- a/chrome/renderer/net/render_dns_queue.cc +++ b/chrome/renderer/net/render_dns_queue.cc @@ -38,7 +38,7 @@ DnsQueue::PushResult DnsQueue::Push(const char* source, if (0 < size_ && readable_ + length < buffer_sentinel_ && 0 == strncmp(source, &buffer_[readable_], unsigned_length) && '\0' == buffer_[readable_ + unsigned_length]) { - SIMPLE_STATS_COUNTER(L"DNS.PrefetchDnsRedundantPush"); + SIMPLE_STATS_COUNTER("DNS.PrefetchDnsRedundantPush"); // We already wrote this name to the queue, so we'll skip this repeat. return REDUNDANT_PUSH; @@ -56,7 +56,7 @@ DnsQueue::PushResult DnsQueue::Push(const char* source, } if (length + 1 >= available_space) { - SIMPLE_STATS_COUNTER(L"DNS.PrefetchDnsQueueFull"); + SIMPLE_STATS_COUNTER("DNS.PrefetchDnsQueueFull"); return OVERFLOW_PUSH; // Not enough space to push. } diff --git a/chrome/test/unit/chrome_test_suite.h b/chrome/test/unit/chrome_test_suite.h index cb97f0d..92f000f 100644 --- a/chrome/test/unit/chrome_test_suite.h +++ b/chrome/test/unit/chrome_test_suite.h @@ -46,7 +46,7 @@ protected: ResourceBundle::GetSharedInstance().LoadThemeResources(); // initialize the global StatsTable for unit_tests - stats_table_ = new StatsTable(L"unit_tests", 20, 200); + stats_table_ = new StatsTable("unit_tests", 20, 200); StatsTable::set_current(stats_table_); } |