diff options
author | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 19:08:23 +0000 |
---|---|---|
committer | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 19:08:23 +0000 |
commit | 553dba6dd707ee02e609910462d2b7977f284af2 (patch) | |
tree | c38ea1fbfb3a1d387134541faa9bdfc0720234cf /net | |
parent | 0e7fe5cab991f8751ecaa6cd43ff7e51d9647dde (diff) | |
download | chromium_src-553dba6dd707ee02e609910462d2b7977f284af2.zip chromium_src-553dba6dd707ee02e609910462d2b7977f284af2.tar.gz chromium_src-553dba6dd707ee02e609910462d2b7977f284af2.tar.bz2 |
Use string for Histogram names since these are all ASCII anyway.
Wide-character literals cause problems between platforms.
Review URL: http://codereview.chromium.org/28046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10276 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/connection_type_histograms.cc | 4 | ||||
-rw-r--r-- | net/base/file_stream_win.cc | 3 | ||||
-rw-r--r-- | net/base/mime_sniffer.cc | 17 | ||||
-rw-r--r-- | net/base/sdch_filter.cc | 24 | ||||
-rw-r--r-- | net/base/sdch_manager.cc | 6 | ||||
-rw-r--r-- | net/base/x509_certificate.cc | 3 | ||||
-rw-r--r-- | net/disk_cache/backend_impl.cc | 12 | ||||
-rw-r--r-- | net/disk_cache/block_files.cc | 6 | ||||
-rw-r--r-- | net/disk_cache/entry_impl.cc | 11 | ||||
-rw-r--r-- | net/disk_cache/eviction.cc | 6 | ||||
-rw-r--r-- | net/disk_cache/rankings.cc | 4 | ||||
-rw-r--r-- | net/disk_cache/stats.cc | 3 | ||||
-rw-r--r-- | net/disk_cache/stats_histogram.h | 3 | ||||
-rw-r--r-- | net/http/http_network_transaction.cc | 4 | ||||
-rw-r--r-- | net/proxy/proxy_resolver_winhttp.cc | 5 |
15 files changed, 52 insertions, 59 deletions
diff --git a/net/base/connection_type_histograms.cc b/net/base/connection_type_histograms.cc index a5c6610..6e4a929 100644 --- a/net/base/connection_type_histograms.cc +++ b/net/base/connection_type_histograms.cc @@ -22,10 +22,10 @@ namespace net { // expansion. void UpdateConnectionTypeHistograms(ConnectionType type) { static bool had_connection_type[NUM_OF_CONNECTION_TYPES]; - static LinearHistogram counter1(L"Net.HadConnectionType", + static LinearHistogram counter1("Net.HadConnectionType", 1, NUM_OF_CONNECTION_TYPES, NUM_OF_CONNECTION_TYPES + 1); - static LinearHistogram counter2(L"Net.ConnectionTypeCount", + static LinearHistogram counter2("Net.ConnectionTypeCount", 1, NUM_OF_CONNECTION_TYPES, NUM_OF_CONNECTION_TYPES + 1); diff --git a/net/base/file_stream_win.cc b/net/base/file_stream_win.cc index 1ab71df..0a6c201 100644 --- a/net/base/file_stream_win.cc +++ b/net/base/file_stream_win.cc @@ -78,7 +78,7 @@ FileStream::AsyncContext::~AsyncContext() { } if (waited) { // We want to see if we block the message loop for too long. - UMA_HISTOGRAM_TIMES(L"AsyncIO.FileStreamClose", base::Time::Now() - start); + UMA_HISTOGRAM_TIMES("AsyncIO.FileStreamClose", base::Time::Now() - start); } } @@ -288,4 +288,3 @@ int FileStream::Write( } } // namespace net - diff --git a/net/base/mime_sniffer.cc b/net/base/mime_sniffer.cc index da117e2..d982f85 100644 --- a/net/base/mime_sniffer.cc +++ b/net/base/mime_sniffer.cc @@ -103,7 +103,7 @@ namespace { class SnifferHistogram : public LinearHistogram { public: - SnifferHistogram(const wchar_t* name, int array_size) + SnifferHistogram(const char* name, int array_size) : LinearHistogram(name, 0, array_size - 1, array_size) { SetFlags(kUmaTargetedHistogramFlag); } @@ -273,7 +273,7 @@ static bool SniffForHTML(const char* content, size_t size, if (!IsAsciiWhitespace(*pos)) break; } - static SnifferHistogram counter(L"mime_sniffer.kSniffableTags2", + static SnifferHistogram counter("mime_sniffer.kSniffableTags2", arraysize(kSniffableTags)); // |pos| now points to first non-whitespace character (or at end). return CheckForMagicNumbers(pos, end - pos, @@ -284,7 +284,7 @@ static bool SniffForHTML(const char* content, size_t size, static bool SniffForMagicNumbers(const char* content, size_t size, std::string* result) { // Check our big table of Magic Numbers - static SnifferHistogram counter(L"mime_sniffer.kMagicNumbers2", + static SnifferHistogram counter("mime_sniffer.kMagicNumbers2", arraysize(kMagicNumbers)); return CheckForMagicNumbers(content, size, kMagicNumbers, arraysize(kMagicNumbers), @@ -320,7 +320,7 @@ static bool SniffXML(const char* content, size_t size, std::string* result) { // We want to skip XML processing instructions (of the form "<?xml ...") // and stop at the first "plain" tag, then make a decision on the mime-type // based on the name (or possibly attributes) of that tag. - static SnifferHistogram counter(L"mime_sniffer.kMagicXML2", + static SnifferHistogram counter("mime_sniffer.kMagicXML2", arraysize(kMagicXML)); const int kMaxTagIterations = 5; for (int i = 0; i < kMaxTagIterations && pos < end; ++i) { @@ -387,7 +387,7 @@ static char kByteLooksBinary[] = { static bool LooksBinary(const char* content, size_t size) { // First, we look for a BOM. - static SnifferHistogram counter(L"mime_sniffer.kByteOrderMark2", + static SnifferHistogram counter("mime_sniffer.kByteOrderMark2", arraysize(kByteOrderMark)); std::string unused; if (CheckForMagicNumbers(content, size, @@ -421,7 +421,7 @@ static bool IsUnknownMimeType(const std::string& mime_type) { // Firefox rejects a mime type if it is exactly */* "*/*", }; - static SnifferHistogram counter(L"mime_sniffer.kUnknownMimeTypes2", + static SnifferHistogram counter("mime_sniffer.kUnknownMimeTypes2", arraysize(kUnknownMimeTypes) + 1); for (size_t i = 0; i < arraysize(kUnknownMimeTypes); ++i) { if (mime_type == kUnknownMimeTypes[i]) { @@ -439,7 +439,7 @@ static bool IsUnknownMimeType(const std::string& mime_type) { bool ShouldSniffMimeType(const GURL& url, const std::string& mime_type) { static SnifferHistogram should_sniff_counter( - L"mime_sniffer.ShouldSniffMimeType2", 3); + "mime_sniffer.ShouldSniffMimeType2", 3); // We are willing to sniff the mime type for HTTP, HTTPS, and FTP bool sniffable_scheme = url.is_empty() || url.SchemeIs("http") || @@ -463,7 +463,7 @@ bool ShouldSniffMimeType(const GURL& url, const std::string& mime_type) { "text/xml", "application/xml", }; - static SnifferHistogram counter(L"mime_sniffer.kSniffableTypes2", + static SnifferHistogram counter("mime_sniffer.kSniffableTypes2", arraysize(kSniffableTypes) + 1); for (size_t i = 0; i < arraysize(kSniffableTypes); ++i) { if (mime_type == kSniffableTypes[i]) { @@ -555,4 +555,3 @@ bool SniffMimeType(const char* content, size_t content_size, } } // namespace net - diff --git a/net/base/sdch_filter.cc b/net/base/sdch_filter.cc index 37d5871..9309de6 100644 --- a/net/base/sdch_filter.cc +++ b/net/base/sdch_filter.cc @@ -31,7 +31,7 @@ SdchFilter::~SdchFilter() { static int filter_use_count = 0; ++filter_use_count; if (META_REFRESH_RECOVERY == decoding_status_) { - UMA_HISTOGRAM_COUNTS(L"Sdch.FilterUseBeforeDisabling", filter_use_count); + UMA_HISTOGRAM_COUNTS("Sdch.FilterUseBeforeDisabling", filter_use_count); } if (vcdiff_streaming_decoder_.get()) { @@ -53,46 +53,46 @@ SdchFilter::~SdchFilter() { // considered (per suggestion from Jake Brutlag). if (10 >= duration.InMinutes()) { if (DECODING_IN_PROGRESS == decoding_status_) { - UMA_HISTOGRAM_CLIPPED_TIMES(L"Sdch.Network_Decode_Latency_F", duration, + UMA_HISTOGRAM_CLIPPED_TIMES("Sdch.Network_Decode_Latency_F", duration, base::TimeDelta::FromMilliseconds(20), base::TimeDelta::FromMinutes(10), 100); - UMA_HISTOGRAM_CLIPPED_TIMES(L"Sdch.Network_Decode_1st_To_Last", + UMA_HISTOGRAM_CLIPPED_TIMES("Sdch.Network_Decode_1st_To_Last", read_times_.back() - read_times_[0], base::TimeDelta::FromMilliseconds(20), base::TimeDelta::FromMinutes(10), 100); if (read_times_.size() > 3) { - UMA_HISTOGRAM_CLIPPED_TIMES(L"Sdch.Network_Decode_3rd_To_4th", + UMA_HISTOGRAM_CLIPPED_TIMES("Sdch.Network_Decode_3rd_To_4th", read_times_[3] - read_times_[2], base::TimeDelta::FromMilliseconds(10), base::TimeDelta::FromSeconds(3), 100); - UMA_HISTOGRAM_CLIPPED_TIMES(L"Sdch.Network_Decode_2nd_To_3rd", + UMA_HISTOGRAM_CLIPPED_TIMES("Sdch.Network_Decode_2nd_To_3rd", read_times_[2] - read_times_[1], base::TimeDelta::FromMilliseconds(10), base::TimeDelta::FromSeconds(3), 100); } - UMA_HISTOGRAM_COUNTS_100(L"Sdch.Network_Decode_Reads", + UMA_HISTOGRAM_COUNTS_100("Sdch.Network_Decode_Reads", read_times_.size()); - UMA_HISTOGRAM_COUNTS(L"Sdch.Network_Decode_Bytes_Read", output_bytes_); + UMA_HISTOGRAM_COUNTS("Sdch.Network_Decode_Bytes_Read", output_bytes_); } else if (PASS_THROUGH == decoding_status_) { - UMA_HISTOGRAM_CLIPPED_TIMES(L"Sdch.Network_Pass-through_Latency_F", + UMA_HISTOGRAM_CLIPPED_TIMES("Sdch.Network_Pass-through_Latency_F", duration, base::TimeDelta::FromMilliseconds(20), base::TimeDelta::FromMinutes(10), 100); - UMA_HISTOGRAM_CLIPPED_TIMES(L"Sdch.Network_Pass-through_1st_To_Last", + UMA_HISTOGRAM_CLIPPED_TIMES("Sdch.Network_Pass-through_1st_To_Last", read_times_.back() - read_times_[0], base::TimeDelta::FromMilliseconds(20), base::TimeDelta::FromMinutes(10), 100); if (read_times_.size() > 3) { - UMA_HISTOGRAM_CLIPPED_TIMES(L"Sdch.Network_Pass-through_3rd_To_4th", + UMA_HISTOGRAM_CLIPPED_TIMES("Sdch.Network_Pass-through_3rd_To_4th", read_times_[3] - read_times_[2], base::TimeDelta::FromMilliseconds(10), base::TimeDelta::FromSeconds(3), 100); - UMA_HISTOGRAM_CLIPPED_TIMES(L"Sdch.Network_Pass-through_2nd_To_3rd", + UMA_HISTOGRAM_CLIPPED_TIMES("Sdch.Network_Pass-through_2nd_To_3rd", read_times_[2] - read_times_[1], base::TimeDelta::FromMilliseconds(10), base::TimeDelta::FromSeconds(3), 100); } - UMA_HISTOGRAM_COUNTS_100(L"Sdch.Network_Pass-through_Reads", + UMA_HISTOGRAM_COUNTS_100("Sdch.Network_Pass-through_Reads", read_times_.size()); } } diff --git a/net/base/sdch_manager.cc b/net/base/sdch_manager.cc index 1f1ff0a..de17905 100644 --- a/net/base/sdch_manager.cc +++ b/net/base/sdch_manager.cc @@ -32,7 +32,7 @@ SdchManager* SdchManager::Global() { // static void SdchManager::SdchErrorRecovery(ProblemCodes problem) { - static LinearHistogram histogram(L"Sdch.ProblemCodes_2", MIN_PROBLEM_CODE, + static LinearHistogram histogram("Sdch.ProblemCodes_2", MIN_PROBLEM_CODE, MAX_PROBLEM_CODE - 1, MAX_PROBLEM_CODE); histogram.SetFlags(kUmaTargetedHistogramFlag); histogram.Add(problem); @@ -263,7 +263,7 @@ bool SdchManager::AddSdchDictionary(const std::string& dictionary_text, return false; } - UMA_HISTOGRAM_COUNTS(L"Sdch.Dictionary size loaded", dictionary_text.size()); + UMA_HISTOGRAM_COUNTS("Sdch.Dictionary size loaded", dictionary_text.size()); DLOG(INFO) << "Loaded dictionary with client hash " << client_hash << " and server hash " << server_hash; Dictionary* dictionary = @@ -304,7 +304,7 @@ void SdchManager::GetAvailDictionaryList(const GURL& target_url, } // Watch to see if we have corrupt or numerous dictionaries. if (count > 0) - UMA_HISTOGRAM_COUNTS(L"Sdch.Advertisement_Count", count); + UMA_HISTOGRAM_COUNTS("Sdch.Advertisement_Count", count); } SdchManager::Dictionary::Dictionary(const std::string& dictionary_text, diff --git a/net/base/x509_certificate.cc b/net/base/x509_certificate.cc index 4a7a9e4..3565567 100644 --- a/net/base/x509_certificate.cc +++ b/net/base/x509_certificate.cc @@ -139,7 +139,7 @@ X509Certificate* X509Certificate::CreateFromHandle(OSCertHandle cert_handle, // We've found a certificate with the same fingerprint in our cache. We // own the |cert_handle|, which makes it our job to free it. FreeOSCertHandle(cert_handle); - DHISTOGRAM_COUNTS(L"X509CertificateReuseCount", 1); + DHISTOGRAM_COUNTS("X509CertificateReuseCount", 1); return cached_cert; } // Kick out the old certificate from our cache. The new one is better. @@ -193,4 +193,3 @@ bool X509Certificate::IsEV(int status) const { #endif } // namespace net - diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index a078bc4..52d8f65 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -276,7 +276,7 @@ bool BackendImpl::OpenEntry(const std::string& key, Entry** entry) { DCHECK(entry); *entry = cache_entry; - UMA_HISTOGRAM_TIMES(L"DiskCache.OpenTime", Time::Now() - start); + UMA_HISTOGRAM_TIMES("DiskCache.OpenTime", Time::Now() - start); stats_.OnEvent(Stats::OPEN_HIT); return true; } @@ -349,7 +349,7 @@ bool BackendImpl::CreateEntry(const std::string& key, Entry** entry) { *entry = NULL; cache_entry.swap(reinterpret_cast<EntryImpl**>(entry)); - UMA_HISTOGRAM_TIMES(L"DiskCache.CreateTime", Time::Now() - start); + UMA_HISTOGRAM_TIMES("DiskCache.CreateTime", Time::Now() - start); stats_.OnEvent(Stats::CREATE_HIT); Trace("create entry hit "); return true; @@ -651,7 +651,7 @@ void BackendImpl::CriticalError(int error) { } void BackendImpl::ReportError(int error) { - static LinearHistogram counter(L"DiskCache.Error", 0, 49, 50); + static LinearHistogram counter("DiskCache.Error", 0, 49, 50); counter.SetFlags(kUmaTargetedHistogramFlag); // We transmit positive numbers, instead of direct error codes. @@ -679,9 +679,9 @@ void BackendImpl::OnStatsTimer() { if (first_time) { first_time = false; int experiment = data_->header.experiment; - std::wstring entries(StringPrintf(L"DiskCache.Entries_%d", experiment)); - std::wstring size(StringPrintf(L"DiskCache.Size_%d", experiment)); - std::wstring max_size(StringPrintf(L"DiskCache.MaxSize_%d", experiment)); + std::string entries(StringPrintf("DiskCache.Entries_%d", experiment)); + std::string size(StringPrintf("DiskCache.Size_%d", experiment)); + std::string max_size(StringPrintf("DiskCache.MaxSize_%d", experiment)); UMA_HISTOGRAM_COUNTS(entries.c_str(), data_->header.num_entries); UMA_HISTOGRAM_COUNTS(size.c_str(), data_->header.num_bytes / (1024 * 1024)); UMA_HISTOGRAM_COUNTS(max_size.c_str(), max_size_ / (1024 * 1024)); diff --git a/net/disk_cache/block_files.cc b/net/disk_cache/block_files.cc index 84c03b9..63a7c2e 100644 --- a/net/disk_cache/block_files.cc +++ b/net/disk_cache/block_files.cc @@ -66,7 +66,7 @@ bool CreateMapBlock(int target, int size, disk_cache::BlockFileHeader* header, if (target != size) { header->empty[target - size - 1]++; } - HISTOGRAM_TIMES(L"DiskCache.CreateBlock", Time::Now() - start); + HISTOGRAM_TIMES("DiskCache.CreateBlock", Time::Now() - start); return true; } } @@ -114,7 +114,7 @@ void DeleteMapBlock(int index, int size, disk_cache::BlockFileHeader* header) { } header->num_entries--; DCHECK(header->num_entries >= 0); - HISTOGRAM_TIMES(L"DiskCache.DeleteBlock", Time::Now() - start); + HISTOGRAM_TIMES("DiskCache.DeleteBlock", Time::Now() - start); } // Restores the "empty counters" and allocation hints. @@ -323,7 +323,7 @@ MappedFile* BlockFiles::FileForNewBlock(FileType block_type, int block_count) { return NULL; break; } - HISTOGRAM_TIMES(L"DiskCache.GetFileForNewBlock", Time::Now() - start); + HISTOGRAM_TIMES("DiskCache.GetFileForNewBlock", Time::Now() - start); return file; } diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc index a8f9ad1..b64073a 100644 --- a/net/disk_cache/entry_impl.cc +++ b/net/disk_cache/entry_impl.cc @@ -90,8 +90,8 @@ EntryImpl::EntryImpl(BackendImpl* backend, Addr address) // written before). EntryImpl::~EntryImpl() { if (doomed_) { - UMA_HISTOGRAM_COUNTS(L"DiskCache.DeleteHeader", GetDataSize(0)); - UMA_HISTOGRAM_COUNTS(L"DiskCache.DeleteData", GetDataSize(1)); + UMA_HISTOGRAM_COUNTS("DiskCache.DeleteHeader", GetDataSize(0)); + UMA_HISTOGRAM_COUNTS("DiskCache.DeleteData", GetDataSize(1)); for (int index = 0; index < NUM_STREAMS; index++) { Addr address(entry_.Data()->data_addr[index]); if (address.is_initialized()) { @@ -211,7 +211,7 @@ int EntryImpl::ReadData(int index, int offset, net::IOBuffer* buf, int buf_len, return net::ERR_INVALID_ARGUMENT; Time start = Time::Now(); - static Histogram stats(L"DiskCache.ReadTime", TimeDelta::FromMilliseconds(1), + static Histogram stats("DiskCache.ReadTime", TimeDelta::FromMilliseconds(1), TimeDelta::FromSeconds(10), 50); stats.SetFlags(kUmaTargetedHistogramFlag); @@ -285,7 +285,7 @@ int EntryImpl::WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, } Time start = Time::Now(); - static Histogram stats(L"DiskCache.WriteTime", TimeDelta::FromMilliseconds(1), + static Histogram stats("DiskCache.WriteTime", TimeDelta::FromMilliseconds(1), TimeDelta::FromSeconds(10), 50); stats.SetFlags(kUmaTargetedHistogramFlag); @@ -557,7 +557,7 @@ void EntryImpl::DeleteData(Addr address, int index) { files_[index] = NULL; // Releases the object. if (!DeleteCacheFile(backend_->GetFileName(address))) { - UMA_HISTOGRAM_COUNTS(L"DiskCache.DeleteFailed", 1); + UMA_HISTOGRAM_COUNTS("DiskCache.DeleteFailed", 1); LOG(ERROR) << "Failed to delete " << backend_->GetFileName(address) << " from the cache."; } @@ -785,4 +785,3 @@ void EntryImpl::Log(const char* msg) { } } // namespace disk_cache - diff --git a/net/disk_cache/eviction.cc b/net/disk_cache/eviction.cc index 11ff969..11bce72 100644 --- a/net/disk_cache/eviction.cc +++ b/net/disk_cache/eviction.cc @@ -80,7 +80,7 @@ void Eviction::TrimCache(bool empty) { } } - UMA_HISTOGRAM_TIMES(L"DiskCache.TotalTrimTime", Time::Now() - start); + UMA_HISTOGRAM_TIMES("DiskCache.TotalTrimTime", Time::Now() - start); Trace("*** Trim Cache end ***"); return; } @@ -107,8 +107,8 @@ void Eviction::ReportTrimTimes(EntryImpl* entry) { static bool first_time = true; if (first_time) { first_time = false; - std::wstring name(StringPrintf(L"DiskCache.TrimAge_%d", - header_->experiment)); + std::string name(StringPrintf("DiskCache.TrimAge_%d", + header_->experiment)); static Histogram counter(name.c_str(), 1, 10000, 50); counter.SetFlags(kUmaTargetedHistogramFlag); counter.Add((Time::Now() - entry->GetLastUsed()).InHours()); diff --git a/net/disk_cache/rankings.cc b/net/disk_cache/rankings.cc index d786077..01a7222 100644 --- a/net/disk_cache/rankings.cc +++ b/net/disk_cache/rankings.cc @@ -234,7 +234,7 @@ bool Rankings::GetRanking(CacheRankingsBlock* rankings) { EntryImpl* cache_entry = reinterpret_cast<EntryImpl*>(rankings->Data()->pointer); rankings->SetData(cache_entry->rankings()->Data()); - UMA_HISTOGRAM_TIMES(L"DiskCache.GetRankings", Time::Now() - start); + UMA_HISTOGRAM_TIMES("DiskCache.GetRankings", Time::Now() - start); return true; } @@ -389,7 +389,7 @@ void Rankings::UpdateRank(CacheRankingsBlock* node, bool modified, List list) { Time start = Time::Now(); Remove(node, list); Insert(node, modified, list); - UMA_HISTOGRAM_TIMES(L"DiskCache.UpdateRank", Time::Now() - start); + UMA_HISTOGRAM_TIMES("DiskCache.UpdateRank", Time::Now() - start); } void Rankings::CompleteTransaction() { diff --git a/net/disk_cache/stats.cc b/net/disk_cache/stats.cc index 7c49e5c..a6733cb 100644 --- a/net/disk_cache/stats.cc +++ b/net/disk_cache/stats.cc @@ -123,7 +123,7 @@ bool Stats::Init(BackendImpl* backend, uint32* storage_addr) { if (!size_histogram_.get()) { // Stats may be reused when the cache is re-created, but we want only one // histogram at any given time. - size_histogram_.reset(new StatsHistogram(L"DiskCache.SizeStats")); + size_histogram_.reset(new StatsHistogram("DiskCache.SizeStats")); size_histogram_->Init(this); } @@ -267,4 +267,3 @@ void Stats::GetItems(StatsItems* items) { } } // namespace disk_cache - diff --git a/net/disk_cache/stats_histogram.h b/net/disk_cache/stats_histogram.h index 4dd76cc..8db3bb3 100644 --- a/net/disk_cache/stats_histogram.h +++ b/net/disk_cache/stats_histogram.h @@ -23,7 +23,7 @@ class StatsHistogram : public Histogram { } }; - explicit StatsHistogram(const wchar_t* name) + explicit StatsHistogram(const char* name) : Histogram(name, 1, 1, 2), init_(false) {} ~StatsHistogram(); @@ -43,4 +43,3 @@ class StatsHistogram : public Histogram { } // namespace disk_cache #endif // NET_DISK_CACHE_STATS_HISTOGRAM_H_ - diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index eecb2f4..0e4f5b7 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -893,10 +893,10 @@ void HttpNetworkTransaction::LogTransactionMetrics() const { base::TimeDelta duration = base::Time::Now() - response_.request_time; if (60 < duration.InMinutes()) return; - UMA_HISTOGRAM_LONG_TIMES(L"Net.Transaction_Latency", duration); + UMA_HISTOGRAM_LONG_TIMES("Net.Transaction_Latency", duration); if (!duration.InMilliseconds()) return; - UMA_HISTOGRAM_COUNTS(L"Net.Transaction_Bandwidth", + UMA_HISTOGRAM_COUNTS("Net.Transaction_Bandwidth", static_cast<int> (content_read_ / duration.InMilliseconds())); } diff --git a/net/proxy/proxy_resolver_winhttp.cc b/net/proxy/proxy_resolver_winhttp.cc index aa7ab83..6065846 100644 --- a/net/proxy/proxy_resolver_winhttp.cc +++ b/net/proxy/proxy_resolver_winhttp.cc @@ -27,9 +27,9 @@ static BOOL CallWinHttpGetProxyForUrl(HINTERNET session, LPCWSTR url, // Record separately success and failure times since they will have very // different characteristics. if (rv) { - UMA_HISTOGRAM_LONG_TIMES(L"Net.GetProxyForUrl_OK", time_delta); + UMA_HISTOGRAM_LONG_TIMES("Net.GetProxyForUrl_OK", time_delta); } else { - UMA_HISTOGRAM_LONG_TIMES(L"Net.GetProxyForUrl_FAIL", time_delta); + UMA_HISTOGRAM_LONG_TIMES("Net.GetProxyForUrl_FAIL", time_delta); } return rv; } @@ -159,4 +159,3 @@ void ProxyResolverWinHttp::CloseWinHttpSession() { } } // namespace net - |