summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-16 01:05:46 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-16 01:05:46 +0000
commitb30a3f5c4fc1e62eaffa8db57bc5681665df3643 (patch)
treeb5703b6ef2d6e879473861f0d85252f813144749
parentfe62fc852bd3c1c162ee1f41992096f59387dc31 (diff)
downloadchromium_src-b30a3f5c4fc1e62eaffa8db57bc5681665df3643.zip
chromium_src-b30a3f5c4fc1e62eaffa8db57bc5681665df3643.tar.gz
chromium_src-b30a3f5c4fc1e62eaffa8db57bc5681665df3643.tar.bz2
Convert LOG(INFO) to VLOG(1) - net/.
Also converts COOKIE_DLOG (since VLOG can be toggled on a granular basis), removes some unneeded "endl"s and {}s, aligns "<<"s per style guide, and changes KeygenHandler::GenKeyAndSignChallenge() to avoid using "goto". BUG=none TEST=none Review URL: http://codereview.chromium.org/3846001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62831 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/base/cert_database_nss.cc2
-rw-r--r--net/base/cookie_monster.cc39
-rw-r--r--net/base/host_resolver_impl.cc7
-rw-r--r--net/base/keygen_handler_mac.cc7
-rw-r--r--net/base/keygen_handler_unittest.cc4
-rw-r--r--net/base/keygen_handler_win.cc7
-rw-r--r--net/base/net_util.cc6
-rw-r--r--net/base/network_change_notifier_linux.cc2
-rw-r--r--net/base/sdch_manager.cc4
-rw-r--r--net/disk_cache/backend_impl.cc7
-rw-r--r--net/http/http_alternate_protocols.cc2
-rw-r--r--net/http/http_auth.cc4
-rw-r--r--net/http/http_auth_controller.cc6
-rw-r--r--net/http/http_auth_gssapi_posix.cc24
-rw-r--r--net/http/http_auth_handler_digest.cc6
-rw-r--r--net/http/http_auth_handler_negotiate.cc6
-rw-r--r--net/http/http_auth_sspi_win.cc8
-rw-r--r--net/http/http_cache_transaction.cc8
-rw-r--r--net/http/http_chunked_decoder.cc17
-rw-r--r--net/http/http_chunked_decoder.h10
-rw-r--r--net/http/http_response_headers.cc18
-rw-r--r--net/proxy/proxy_config_service_linux.cc18
-rw-r--r--net/proxy/proxy_config_service_linux.h2
-rw-r--r--net/proxy/proxy_resolver_js_bindings.cc6
-rw-r--r--net/proxy/proxy_resolver_js_bindings.h4
-rw-r--r--net/proxy/proxy_resolver_v8_unittest.cc6
-rw-r--r--net/proxy/proxy_script_fetcher.cc8
-rw-r--r--net/proxy/proxy_service.cc4
-rw-r--r--net/socket/socket_test_util.cc75
-rw-r--r--net/socket/socks_client_socket.cc10
-rw-r--r--net/socket/ssl_client_socket_mac.cc23
-rw-r--r--net/socket/ssl_client_socket_nss.cc46
-rw-r--r--net/socket/ssl_client_socket_openssl.cc2
-rw-r--r--net/socket/tcp_client_socket_libevent.cc8
-rw-r--r--net/socket/tcp_client_socket_win.cc2
-rw-r--r--net/socket_stream/socket_stream.cc6
-rw-r--r--net/socket_stream/socket_stream_unittest.cc4
-rw-r--r--net/spdy/spdy_framer.cc5
-rw-r--r--net/test/test_server.cc2
-rw-r--r--net/third_party/mozilla_security_manager/nsKeygenHandler.cpp8
-rw-r--r--net/third_party/mozilla_security_manager/nsNSSCertificateDB.cpp6
-rw-r--r--net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp4
-rw-r--r--net/url_request/url_request.cc4
-rw-r--r--net/url_request/url_request_filter.cc4
-rw-r--r--net/websockets/websocket_handshake.cc5
-rw-r--r--net/websockets/websocket_handshake_draft75.cc10
-rw-r--r--net/websockets/websocket_throttle.cc4
-rw-r--r--net/websockets/websocket_throttle_unittest.cc36
48 files changed, 243 insertions, 263 deletions
diff --git a/net/base/cert_database_nss.cc b/net/base/cert_database_nss.cc
index 69b2128..8445d4d 100644
--- a/net/base/cert_database_nss.cc
+++ b/net/base/cert_database_nss.cc
@@ -137,7 +137,7 @@ X509Certificate* CertDatabase::FindRootInList(
&certn_1->os_cert_handle()->subject) == SECEqual)
return certn_1;
- LOG(INFO) << "certificate list is not a hierarchy";
+ VLOG(1) << "certificate list is not a hierarchy";
return cert0;
}
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc
index 455a739..1e3b2d9 100644
--- a/net/base/cookie_monster.cc
+++ b/net/base/cookie_monster.cc
@@ -59,13 +59,6 @@
#include "net/base/net_util.h"
#include "net/base/registry_controlled_domain.h"
-// #define COOKIE_LOGGING_ENABLED
-#ifdef COOKIE_LOGGING_ENABLED
-#define COOKIE_DLOG(severity) DLOG_IF(INFO, 1)
-#else
-#define COOKIE_DLOG(severity) DLOG_IF(INFO, 0)
-#endif
-
using base::Time;
using base::TimeDelta;
using base::TimeTicks;
@@ -731,7 +724,7 @@ bool CookieMonster::HasCookieableScheme(const GURL& url) {
}
// The scheme didn't match any in our whitelist.
- COOKIE_DLOG(WARNING) << "Unsupported cookie scheme: " << url.scheme();
+ DVLOG(1) << "WARNING: Unsupported cookie scheme: " << url.scheme();
return false;
}
@@ -754,7 +747,7 @@ bool CookieMonster::SetCookieWithCreationTimeAndOptions(
const CookieOptions& options) {
lock_.AssertAcquired();
- COOKIE_DLOG(INFO) << "SetCookie() line: " << cookie_line;
+ DVLOG(1) << "SetCookie() line: " << cookie_line;
Time creation_time = creation_time_or_null;
if (creation_time.is_null()) {
@@ -766,12 +759,12 @@ bool CookieMonster::SetCookieWithCreationTimeAndOptions(
ParsedCookie pc(cookie_line);
if (!pc.IsValid()) {
- COOKIE_DLOG(WARNING) << "Couldn't parse cookie";
+ DVLOG(1) << "WARNING: Couldn't parse cookie";
return false;
}
if (options.exclude_httponly() && pc.IsHttpOnly()) {
- COOKIE_DLOG(INFO) << "SetCookie() not setting httponly cookie";
+ DVLOG(1) << "SetCookie() not setting httponly cookie";
return false;
}
@@ -792,7 +785,7 @@ bool CookieMonster::SetCookieWithCreationTimeAndOptions(
!cookie_expires.is_null(), cookie_expires));
if (!cc.get()) {
- COOKIE_DLOG(WARNING) << "Failed to allocate CanonicalCookie";
+ DVLOG(1) << "WARNING: Failed to allocate CanonicalCookie";
return false;
}
return SetCanonicalCookie(&cc, creation_time, options);
@@ -846,12 +839,11 @@ bool CookieMonster::SetCanonicalCookie(scoped_ptr<CanonicalCookie>* cc,
const CookieOptions& options) {
const std::string key(GetKey((*cc)->Domain()));
if (DeleteAnyEquivalentCookie(key, **cc, options.exclude_httponly())) {
- COOKIE_DLOG(INFO) << "SetCookie() not clobbering httponly cookie";
+ DVLOG(1) << "SetCookie() not clobbering httponly cookie";
return false;
}
- COOKIE_DLOG(INFO) << "SetCookie() key: " << key
- << " cc: " << (*cc)->DebugString();
+ DVLOG(1) << "SetCookie() key: " << key << " cc: " << (*cc)->DebugString();
// Realize that we might be setting an expired cookie, and the only point
// was to delete the cookie which we've already done.
@@ -914,7 +906,7 @@ void CookieMonster::InternalDeleteCookie(CookieMap::iterator it,
histogram_cookie_deletion_cause_->Add(deletion_cause);
CanonicalCookie* cc = it->second;
- COOKIE_DLOG(INFO) << "InternalDeleteCookie() cc: " << cc->DebugString();
+ DVLOG(1) << "InternalDeleteCookie() cc: " << cc->DebugString();
if (cc->IsPersistent() && store_ && sync_to_store)
store_->DeleteCookie(*cc);
@@ -981,7 +973,7 @@ static bool FindLeastRecentlyAccessed(
std::vector<CookieMonster::CookieMap::iterator>* cookie_its) {
DCHECK_LE(num_purge, num_max);
if (cookie_its->size() > num_max) {
- COOKIE_DLOG(INFO) << "FindLeastRecentlyAccessed() Deep Garbage Collect.";
+ DVLOG(1) << "FindLeastRecentlyAccessed() Deep Garbage Collect.";
num_purge += cookie_its->size() - num_max;
DCHECK_GT(cookie_its->size(), num_purge);
@@ -1027,7 +1019,7 @@ int CookieMonster::GarbageCollect(const Time& current,
// Collect garbage for this key.
if (cookies_.count(key) > kDomainMaxCookies) {
- COOKIE_DLOG(INFO) << "GarbageCollect() key: " << key;
+ DVLOG(1) << "GarbageCollect() key: " << key;
std::vector<CookieMap::iterator> cookie_its;
num_deleted += GarbageCollectExpired(
@@ -1063,7 +1055,7 @@ int CookieMonster::GarbageCollect(const Time& current,
(expiry_and_key_scheme_ == EKS_DISCARD_RECENT_AND_PURGE_DOMAIN ||
earliest_access_time_ <
Time::Now() - TimeDelta::FromDays(kSafeFromGlobalPurgeDays))) {
- COOKIE_DLOG(INFO) << "GarbageCollect() everything";
+ DVLOG(1) << "GarbageCollect() everything";
std::vector<CookieMap::iterator> cookie_its;
base::Time oldest_left;
num_deleted += GarbageCollectExpired(
@@ -1266,7 +1258,7 @@ std::string CookieMonster::GetCookiesWithOptions(const GURL& url,
histogram_time_get_->AddTime(TimeTicks::Now() - start_time);
- COOKIE_DLOG(INFO) << "GetCookies() result: " << cookie_line;
+ DVLOG(1) << "GetCookies() result: " << cookie_line;
return cookie_line;
}
@@ -1504,9 +1496,8 @@ void CookieMonster::RecordPeriodicStats(const base::Time& current_time) {
it_key = its_cookies.second;
}
- DLOG(INFO) << "Time for recording cookie stats (us): "
- << (TimeTicks::Now() - beginning_of_time).InMicroseconds()
- << std::endl;
+ DVLOG(1) << "Time for recording cookie stats (us): "
+ << (TimeTicks::Now() - beginning_of_time).InMicroseconds();
last_statistic_record_time_ = current_time;
}
@@ -1521,7 +1512,7 @@ CookieMonster::ParsedCookie::ParsedCookie(const std::string& cookie_line)
httponly_index_(0) {
if (cookie_line.size() > kMaxCookieSize) {
- LOG(INFO) << "Not parsing cookie, too large: " << cookie_line.size();
+ VLOG(1) << "Not parsing cookie, too large: " << cookie_line.size();
return;
}
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index 5ee66ff..e86718b 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -1315,10 +1315,9 @@ void HostResolverImpl::IPv6ProbeSetDefaultAddressFamily(
DCHECK(address_family == ADDRESS_FAMILY_UNSPECIFIED ||
address_family == ADDRESS_FAMILY_IPV4);
if (default_address_family_ != address_family) {
- LOG(INFO) << "IPv6Probe forced AddressFamily setting to "
- << ((address_family == ADDRESS_FAMILY_UNSPECIFIED)
- ? "ADDRESS_FAMILY_UNSPECIFIED"
- : "ADDRESS_FAMILY_IPV4");
+ VLOG(1) << "IPv6Probe forced AddressFamily setting to "
+ << ((address_family == ADDRESS_FAMILY_UNSPECIFIED) ?
+ "ADDRESS_FAMILY_UNSPECIFIED" : "ADDRESS_FAMILY_IPV4");
}
default_address_family_ = address_family;
// Drop reference since the job has called us back.
diff --git a/net/base/keygen_handler_mac.cc b/net/base/keygen_handler_mac.cc
index f5097a3..460fd46 100644
--- a/net/base/keygen_handler_mac.cc
+++ b/net/base/keygen_handler_mac.cc
@@ -190,11 +190,10 @@ std::string KeygenHandler::GenKeyAndSignChallenge() {
}
failure:
- if (err) {
+ if (err)
LOG(ERROR) << "SSL Keygen failed! OSStatus = " << err;
- } else {
- LOG(INFO) << "SSL Keygen succeeded! Output is: " << result;
- }
+ else
+ VLOG(1) << "SSL Keygen succeeded! Output is: " << result;
// Remove keys from keychain if asked to during unit testing:
if (!stores_key_) {
diff --git a/net/base/keygen_handler_unittest.cc b/net/base/keygen_handler_unittest.cc
index 85fd0bc..62c5191 100644
--- a/net/base/keygen_handler_unittest.cc
+++ b/net/base/keygen_handler_unittest.cc
@@ -76,7 +76,7 @@ TEST_F(KeygenHandlerTest, SmokeTest) {
KeygenHandler handler(768, "some challenge", GURL("http://www.example.com"));
handler.set_stores_key(false); // Don't leave the key-pair behind
std::string result = handler.GenKeyAndSignChallenge();
- LOG(INFO) << "KeygenHandler produced: " << result;
+ VLOG(1) << "KeygenHandler produced: " << result;
AssertValidSignedPublicKeyAndChallenge(result, "some challenge");
}
@@ -134,7 +134,7 @@ TEST_F(KeygenHandlerTest, ConcurrencyTest) {
delete events[i];
events[i] = NULL;
- LOG(INFO) << "KeygenHandler " << i << " produced: " << results[i];
+ VLOG(1) << "KeygenHandler " << i << " produced: " << results[i];
AssertValidSignedPublicKeyAndChallenge(results[i], "some challenge");
}
}
diff --git a/net/base/keygen_handler_win.cc b/net/base/keygen_handler_win.cc
index 8fc32e5..15d8583 100644
--- a/net/base/keygen_handler_win.cc
+++ b/net/base/keygen_handler_win.cc
@@ -191,11 +191,10 @@ std::string KeygenHandler::GenKeyAndSignChallenge() {
}
failure:
- if (!is_success) {
+ if (!is_success)
LOG(ERROR) << "SSL Keygen failed";
- } else {
- LOG(INFO) << "SSL Key succeeded";
- }
+ else
+ VLOG(1) << "SSL Key succeeded";
if (key) {
// Securely destroys the handle, but leaves the underlying key alone. The
// key can be obtained again by resolving the key location. If
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 27621e6..45dc60c 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -1534,7 +1534,7 @@ std::string NetAddressToString(const struct addrinfo* net_address) {
net_address->ai_addrlen, buffer, sizeof(buffer), NULL, 0, NI_NUMERICHOST);
if (result != 0) {
- DLOG(INFO) << "getnameinfo() failed with " << result;
+ DVLOG(1) << "getnameinfo() failed with " << result;
buffer[0] = '\0';
}
return std::string(buffer);
@@ -1564,7 +1564,7 @@ std::string GetHostName() {
char buffer[256];
int result = gethostname(buffer, sizeof(buffer));
if (result != 0) {
- DLOG(INFO) << "gethostname() failed with " << result;
+ DVLOG(1) << "gethostname() failed with " << result;
buffer[0] = '\0';
}
return std::string(buffer);
@@ -1819,7 +1819,7 @@ bool HaveOnlyLoopbackAddresses() {
struct ifaddrs* interface_addr = NULL;
int rv = getifaddrs(&interface_addr);
if (rv != 0) {
- DLOG(INFO) << "getifaddrs() failed with errno = " << errno;
+ DVLOG(1) << "getifaddrs() failed with errno = " << errno;
return false;
}
diff --git a/net/base/network_change_notifier_linux.cc b/net/base/network_change_notifier_linux.cc
index 2601b20..7131845 100644
--- a/net/base/network_change_notifier_linux.cc
+++ b/net/base/network_change_notifier_linux.cc
@@ -97,7 +97,7 @@ void NetworkChangeNotifierLinux::ListenForNotifications() {
int rv = ReadNotificationMessage(buf, arraysize(buf));
while (rv > 0) {
if (HandleNetlinkMessage(buf, rv)) {
- LOG(INFO) << "Detected IP address changes.";
+ VLOG(1) << "Detected IP address changes.";
#if defined(OS_CHROMEOS)
// TODO(zelidrag): chromium-os:3996 - introduced artificial delay to
// work around the issue of proxy initialization before name resolving
diff --git a/net/base/sdch_manager.cc b/net/base/sdch_manager.cc
index 15850d6..5aca923 100644
--- a/net/base/sdch_manager.cc
+++ b/net/base/sdch_manager.cc
@@ -274,8 +274,8 @@ bool SdchManager::AddSdchDictionary(const std::string& dictionary_text,
}
UMA_HISTOGRAM_COUNTS("Sdch3.Dictionary size loaded", dictionary_text.size());
- DLOG(INFO) << "Loaded dictionary with client hash " << client_hash <<
- " and server hash " << server_hash;
+ DVLOG(1) << "Loaded dictionary with client hash " << client_hash
+ << " and server hash " << server_hash;
Dictionary* dictionary =
new Dictionary(dictionary_text, header_end + 2, client_hash,
dictionary_url, domain, path, expiration, ports);
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index e02b79d..eb0c008 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -1835,9 +1835,8 @@ void BackendImpl::LogStats() {
StatsItems stats;
GetStats(&stats);
- for (size_t index = 0; index < stats.size(); index++) {
- LOG(INFO) << stats[index].first << ": " << stats[index].second;
- }
+ for (size_t index = 0; index < stats.size(); index++)
+ VLOG(1) << stats[index].first << ": " << stats[index].second;
}
void BackendImpl::ReportStats() {
diff --git a/net/http/http_alternate_protocols.cc b/net/http/http_alternate_protocols.cc
index e37af69..3e6b488 100644
--- a/net/http/http_alternate_protocols.cc
+++ b/net/http/http_alternate_protocols.cc
@@ -73,7 +73,7 @@ void HttpAlternateProtocols::SetAlternateProtocolFor(
GetAlternateProtocolFor(http_host_port_pair);
if (existing_alternate.protocol == BROKEN) {
- DLOG(INFO) << "Ignore alternate protocol since it's known to be broken.";
+ DVLOG(1) << "Ignore alternate protocol since it's known to be broken.";
return;
}
diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc
index a415185..ddd099c 100644
--- a/net/http/http_auth.cc
+++ b/net/http/http_auth.cc
@@ -42,8 +42,8 @@ void HttpAuth::ChooseBestChallenge(
int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
cur_challenge, target, origin, net_log, &cur);
if (rv != OK) {
- LOG(INFO) << "Unable to create AuthHandler. Status: "
- << ErrorToString(rv) << " Challenge: " << cur_challenge;
+ VLOG(1) << "Unable to create AuthHandler. Status: "
+ << ErrorToString(rv) << " Challenge: " << cur_challenge;
continue;
}
if (cur.get() && (!best.get() || best->score() < cur->score()) &&
diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc
index 545ae2a..e4e2dd4 100644
--- a/net/http/http_auth_controller.cc
+++ b/net/http/http_auth_controller.cc
@@ -196,9 +196,9 @@ int HttpAuthController::HandleAuthChallenge(
DCHECK(CalledOnValidThread());
DCHECK(headers);
DCHECK(auth_origin_.is_valid());
- LOG(INFO) << "The " << HttpAuth::GetAuthTargetString(target_) << " "
- << auth_origin_ << " requested auth"
- << AuthChallengeLogMessage(headers.get());
+ VLOG(1) << "The " << HttpAuth::GetAuthTargetString(target_) << " "
+ << auth_origin_ << " requested auth "
+ << AuthChallengeLogMessage(headers.get());
// Give the existing auth handler first try at the authentication headers.
// This will also evict the entry in the HttpAuthCache if the previous
diff --git a/net/http/http_auth_gssapi_posix.cc b/net/http/http_auth_gssapi_posix.cc
index 674549a..b20ef50 100644
--- a/net/http/http_auth_gssapi_posix.cc
+++ b/net/http/http_auth_gssapi_posix.cc
@@ -736,7 +736,7 @@ namespace {
// This means a simple switch on the return codes is not sufficient.
int MapImportNameStatusToError(OM_uint32 major_status) {
- LOG(INFO) << "import_name returned 0x" << std::hex << major_status;
+ VLOG(1) << "import_name returned 0x" << std::hex << major_status;
if (major_status == GSS_S_COMPLETE)
return OK;
if (GSS_CALLING_ERROR(major_status) != 0)
@@ -763,7 +763,7 @@ int MapImportNameStatusToError(OM_uint32 major_status) {
}
int MapInitSecContextStatusToError(OM_uint32 major_status) {
- LOG(INFO) << "init_sec_context returned 0x" << std::hex << major_status;
+ VLOG(1) << "init_sec_context returned 0x" << std::hex << major_status;
// Although GSS_S_CONTINUE_NEEDED is an additional bit, it seems like
// other code just checks if major_status is equivalent to it to indicate
// that there are no other errors included.
@@ -840,11 +840,8 @@ int HttpAuthGSSAPI::GetNextSecurityToken(const std::wstring& spn,
int rv = MapImportNameStatusToError(major_status);
if (rv != OK) {
LOG(ERROR) << "Problem importing name from "
- << "spn \"" << spn_principal << "\""
- << std::endl
- << DisplayExtendedStatus(library_,
- major_status,
- minor_status);
+ << "spn \"" << spn_principal << "\"\n"
+ << DisplayExtendedStatus(library_, major_status, minor_status);
return rv;
}
ScopedName scoped_name(principal_name, library_);
@@ -869,17 +866,12 @@ int HttpAuthGSSAPI::GetNextSecurityToken(const std::wstring& spn,
NULL);
rv = MapInitSecContextStatusToError(major_status);
if (rv != OK) {
- LOG(ERROR) << "Problem initializing context. "
- << std::endl
- << DisplayExtendedStatus(library_,
- major_status,
- minor_status)
- << std::endl
+ LOG(ERROR) << "Problem initializing context. \n"
+ << DisplayExtendedStatus(library_, major_status, minor_status)
+ << '\n'
<< DescribeContext(library_, scoped_sec_context_.get());
- return rv;
}
-
- return OK;
+ return rv;
}
} // namespace net
diff --git a/net/http/http_auth_handler_digest.cc b/net/http/http_auth_handler_digest.cc
index a802213..f7f178c 100644
--- a/net/http/http_auth_handler_digest.cc
+++ b/net/http/http_auth_handler_digest.cc
@@ -267,7 +267,7 @@ bool HttpAuthHandlerDigest::ParseChallenge(
// Loop through all the properties.
while (parameters.GetNext()) {
if (parameters.value().empty()) {
- DLOG(INFO) << "Invalid digest property";
+ DVLOG(1) << "Invalid digest property";
return false;
}
@@ -308,7 +308,7 @@ bool HttpAuthHandlerDigest::ParseChallengeProperty(const std::string& name,
} else if (LowerCaseEqualsASCII(value, "md5-sess")) {
algorithm_ = ALGORITHM_MD5_SESS;
} else {
- DLOG(INFO) << "Unknown value of algorithm";
+ DVLOG(1) << "Unknown value of algorithm";
return false; // FAIL -- unsupported value of algorithm.
}
} else if (LowerCaseEqualsASCII(name, "qop")) {
@@ -322,7 +322,7 @@ bool HttpAuthHandlerDigest::ParseChallengeProperty(const std::string& name,
}
}
} else {
- DLOG(INFO) << "Skipping unrecognized digest property";
+ DVLOG(1) << "Skipping unrecognized digest property";
// TODO(eroman): perhaps we should fail instead of silently skipping?
}
return true;
diff --git a/net/http/http_auth_handler_negotiate.cc b/net/http/http_auth_handler_negotiate.cc
index 6bbad88..99abdf6 100644
--- a/net/http/http_auth_handler_negotiate.cc
+++ b/net/http/http_auth_handler_negotiate.cc
@@ -81,7 +81,7 @@ int HttpAuthHandlerNegotiate::GenerateAuthTokenImpl(
bool HttpAuthHandlerNegotiate::Init(HttpAuth::ChallengeTokenizer* challenge) {
#if defined(OS_POSIX)
if (!auth_system_.Init()) {
- LOG(INFO) << "can't initialize GSSAPI library";
+ VLOG(1) << "can't initialize GSSAPI library";
return false;
}
// GSSAPI does not provide a way to enter username/password to
@@ -228,8 +228,8 @@ int HttpAuthHandlerNegotiate::DoResolveCanonicalNameComplete(int rv) {
if (rv != OK) {
// Even in the error case, try to use origin_.host instead of
// passing the failure on to the caller.
- LOG(INFO) << "Problem finding canonical name for SPN for host "
- << origin_.host() << ": " << ErrorToString(rv);
+ VLOG(1) << "Problem finding canonical name for SPN for host "
+ << origin_.host() << ": " << ErrorToString(rv);
rv = OK;
}
diff --git a/net/http/http_auth_sspi_win.cc b/net/http/http_auth_sspi_win.cc
index 65281e0..d6fedf9 100644
--- a/net/http/http_auth_sspi_win.cc
+++ b/net/http/http_auth_sspi_win.cc
@@ -21,7 +21,7 @@ namespace {
int MapAcquireCredentialsStatusToError(SECURITY_STATUS status,
const SEC_WCHAR* package) {
- LOG(INFO) << "AcquireCredentialsHandle returned 0x" << std::hex << status;
+ VLOG(1) << "AcquireCredentialsHandle returned 0x" << std::hex << status;
switch (status) {
case SEC_E_OK:
return OK;
@@ -102,7 +102,7 @@ int AcquireDefaultCredentials(SSPILibrary* library, const SEC_WCHAR* package,
}
int MapInitializeSecurityContextStatusToError(SECURITY_STATUS status) {
- LOG(INFO) << "InitializeSecurityContext returned 0x" << std::hex << status;
+ VLOG(1) << "InitializeSecurityContext returned 0x" << std::hex << status;
switch (status) {
case SEC_E_OK:
case SEC_I_CONTINUE_NEEDED:
@@ -146,7 +146,7 @@ int MapInitializeSecurityContextStatusToError(SECURITY_STATUS status) {
}
int MapQuerySecurityPackageInfoStatusToError(SECURITY_STATUS status) {
- LOG(INFO) << "QuerySecurityPackageInfo returned 0x" << std::hex << status;
+ VLOG(1) << "QuerySecurityPackageInfo returned 0x" << std::hex << status;
switch (status) {
case SEC_E_OK:
return OK;
@@ -163,7 +163,7 @@ int MapQuerySecurityPackageInfoStatusToError(SECURITY_STATUS status) {
}
int MapFreeContextBufferStatusToError(SECURITY_STATUS status) {
- LOG(INFO) << "FreeContextBuffer returned 0x" << std::hex << status;
+ VLOG(1) << "FreeContextBuffer returned 0x" << std::hex << status;
switch (status) {
case SEC_E_OK:
return OK;
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 5d05616..6550703 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -780,7 +780,7 @@ int HttpCache::Transaction::DoOpenEntryComplete(int result) {
return OK;
}
if (cache_->mode() == PLAYBACK)
- DLOG(INFO) << "Playback Cache Miss: " << request_->url;
+ DVLOG(1) << "Playback Cache Miss: " << request_->url;
// The entry does not exist, and we are not permitted to create a new entry,
// so we must fail.
@@ -1348,7 +1348,7 @@ void HttpCache::Transaction::SetRequest(const BoundNetLog& net_log,
partial_->SetHeaders(custom_request_->extra_headers);
} else {
// The range is invalid or we cannot handle it properly.
- LOG(INFO) << "Invalid byte range found.";
+ VLOG(1) << "Invalid byte range found.";
effective_load_flags_ |= LOAD_DISABLE_CACHE;
partial_.reset(NULL);
}
@@ -1838,8 +1838,8 @@ void HttpCache::Transaction::DoneWritingToEntry(bool success) {
return;
if (cache_->mode() == RECORD)
- DLOG(INFO) << "Recorded: " << request_->method << request_->url
- << " status: " << response_.headers->response_code();
+ DVLOG(1) << "Recorded: " << request_->method << request_->url
+ << " status: " << response_.headers->response_code();
cache_->DoneWritingToEntry(entry_, success);
entry_ = NULL;
diff --git a/net/http/http_chunked_decoder.cc b/net/http/http_chunked_decoder.cc
index 1ac7a60..455c9ed 100644
--- a/net/http/http_chunked_decoder.cc
+++ b/net/http/http_chunked_decoder.cc
@@ -1,3 +1,10 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Derived from:
+// mozilla/netwerk/protocol/http/src/nsHttpChunkedDecoder.cpp
+// The license block is:
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -35,9 +42,6 @@
*
* ***** END LICENSE BLOCK ***** */
-// Derived from:
-// mozilla/netwerk/protocol/http/src/nsHttpChunkedDecoder.cpp
-
#include "net/http/http_chunked_decoder.h"
#include "base/logging.h"
@@ -111,11 +115,10 @@ int HttpChunkedDecoder::ScanForChunkRemaining(const char* buf, int buf_len) {
}
if (reached_last_chunk_) {
- if (buf_len) {
- DLOG(INFO) << "ignoring http trailer";
- } else {
+ if (buf_len)
+ DVLOG(1) << "ignoring http trailer";
+ else
reached_eof_ = true;
- }
} else if (chunk_terminator_remaining_) {
if (buf_len) {
DLOG(ERROR) << "chunk data not terminated properly";
diff --git a/net/http/http_chunked_decoder.h b/net/http/http_chunked_decoder.h
index cf6e6b9..837499c 100644
--- a/net/http/http_chunked_decoder.h
+++ b/net/http/http_chunked_decoder.h
@@ -1,3 +1,10 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Derived from:
+// mozilla/netwerk/protocol/http/src/nsHttpChunkedDecoder.h
+// The license block is:
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -35,9 +42,6 @@
*
* ***** END LICENSE BLOCK ***** */
-// Derived from:
-// mozilla/netwerk/protocol/http/src/nsHttpChunkedDecoder.h
-
#ifndef NET_HTTP_HTTP_CHUNKED_DECODER_H_
#define NET_HTTP_HTTP_CHUNKED_DECODER_H_
#pragma once
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 631b3a1..99c5404 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -513,20 +513,20 @@ HttpVersion HttpResponseHeaders::ParseVersion(
// TODO: handle leading zeros, which is allowed by the rfc1616 sec 3.1.
if ((line_end - p < 4) || !LowerCaseEqualsASCII(p, p + 4, "http")) {
- DLOG(INFO) << "missing status line";
+ DVLOG(1) << "missing status line";
return HttpVersion();
}
p += 4;
if (p >= line_end || *p != '/') {
- DLOG(INFO) << "missing version";
+ DVLOG(1) << "missing version";
return HttpVersion();
}
std::string::const_iterator dot = find(p, line_end, '.');
if (dot == line_end) {
- DLOG(INFO) << "malformed version";
+ DVLOG(1) << "malformed version";
return HttpVersion();
}
@@ -534,7 +534,7 @@ HttpVersion HttpResponseHeaders::ParseVersion(
++dot; // from . to second digit.
if (!(*p >= '0' && *p <= '9' && *dot >= '0' && *dot <= '9')) {
- DLOG(INFO) << "malformed version number";
+ DVLOG(1) << "malformed version number";
return HttpVersion();
}
@@ -566,15 +566,15 @@ void HttpResponseHeaders::ParseStatusLine(
raw_headers_ = "HTTP/1.0";
}
if (parsed_http_version_ != http_version_) {
- DLOG(INFO) << "assuming HTTP/" << http_version_.major_value() << "."
- << http_version_.minor_value();
+ DVLOG(1) << "assuming HTTP/" << http_version_.major_value() << "."
+ << http_version_.minor_value();
}
// TODO(eroman): this doesn't make sense if ParseVersion failed.
std::string::const_iterator p = find(line_begin, line_end, ' ');
if (p == line_end) {
- DLOG(INFO) << "missing response status; assuming 200 OK";
+ DVLOG(1) << "missing response status; assuming 200 OK";
raw_headers_.append(" 200 OK");
raw_headers_.push_back('\0');
response_code_ = 200;
@@ -590,7 +590,7 @@ void HttpResponseHeaders::ParseStatusLine(
++p;
if (p == code) {
- DLOG(INFO) << "missing response status number; assuming 200";
+ DVLOG(1) << "missing response status number; assuming 200";
raw_headers_.append(" 200 OK");
response_code_ = 200;
return;
@@ -609,7 +609,7 @@ void HttpResponseHeaders::ParseStatusLine(
--line_end;
if (p == line_end) {
- DLOG(INFO) << "missing response status text; assuming OK";
+ DVLOG(1) << "missing response status text; assuming OK";
// Not super critical what we put here. Just use "OK"
// even if it isn't descriptive of response_code_.
raw_headers_.append("OK");
diff --git a/net/proxy/proxy_config_service_linux.cc b/net/proxy/proxy_config_service_linux.cc
index b61167f..fe82e24 100644
--- a/net/proxy/proxy_config_service_linux.cc
+++ b/net/proxy/proxy_config_service_linux.cc
@@ -205,7 +205,7 @@ class GConfSettingGetterImplGConf
// We are on the UI thread so we can clean it safely. This is
// the case at least for ui_tests running under Valgrind in
// bug 16076.
- LOG(INFO) << "~GConfSettingGetterImplGConf: releasing gconf client";
+ VLOG(1) << "~GConfSettingGetterImplGConf: releasing gconf client";
Shutdown();
} else {
LOG(WARNING) << "~GConfSettingGetterImplGConf: leaking gconf client";
@@ -400,8 +400,8 @@ class GConfSettingGetterImplGConf
static void OnGConfChangeNotification(
GConfClient* client, guint cnxn_id,
GConfEntry* entry, gpointer user_data) {
- LOG(INFO) << "gconf change notification for key "
- << gconf_entry_get_key(entry);
+ VLOG(1) << "gconf change notification for key "
+ << gconf_entry_get_key(entry);
// We don't track which key has changed, just that something did change.
GConfSettingGetterImplGConf* setting_getter =
reinterpret_cast<GConfSettingGetterImplGConf*>(user_data);
@@ -809,7 +809,7 @@ class GConfSettingGetterImplKDE
// This is the callback from the debounce timer.
void OnDebouncedNotification() {
DCHECK(MessageLoop::current() == file_loop_);
- LOG(INFO) << "inotify change notification for kioslaverc";
+ VLOG(1) << "inotify change notification for kioslaverc";
UpdateCachedSettings();
DCHECK(notify_delegate_);
// Forward to a method on the proxy config service delegate object.
@@ -1095,7 +1095,7 @@ void ProxyConfigServiceLinux::Delegate::SetupAndFetchInitialConfig(
// proxy setting change notifications. This should not be the usual
// case but is intended to simplify test setups.
if (!io_loop_ || !file_loop)
- LOG(INFO) << "Monitoring of proxy setting changes is disabled";
+ VLOG(1) << "Monitoring of proxy setting changes is disabled";
// Fetch and cache the current proxy config. The config is left in
// cached_config_, where GetLatestProxyConfig() running on the IO thread
@@ -1116,8 +1116,8 @@ void ProxyConfigServiceLinux::Delegate::SetupAndFetchInitialConfig(
if (GetConfigFromGConf(&cached_config_)) {
cached_config_.set_id(1); // mark it as valid
got_config = true;
- LOG(INFO) << "Obtained proxy settings from " <<
- gconf_getter_->GetDataSource();
+ VLOG(1) << "Obtained proxy settings from "
+ << gconf_getter_->GetDataSource();
// If gconf proxy mode is "none", meaning direct, then we take
// that to be a valid config and will not check environment
// variables. The alternative would have been to look for a proxy
@@ -1141,7 +1141,7 @@ void ProxyConfigServiceLinux::Delegate::SetupAndFetchInitialConfig(
// work.
if (GetConfigFromEnv(&cached_config_)) {
cached_config_.set_id(1); // mark it as valid
- LOG(INFO) << "Obtained proxy settings from environment variables";
+ VLOG(1) << "Obtained proxy settings from environment variables";
}
}
}
@@ -1201,7 +1201,7 @@ void ProxyConfigServiceLinux::Delegate::OnCheckProxyConfigSettings() {
void ProxyConfigServiceLinux::Delegate::SetNewProxyConfig(
const ProxyConfig& new_config) {
DCHECK(MessageLoop::current() == io_loop_);
- LOG(INFO) << "Proxy configuration changed";
+ VLOG(1) << "Proxy configuration changed";
cached_config_ = new_config;
FOR_EACH_OBSERVER(Observer, observers_, OnProxyConfigChanged(new_config));
}
diff --git a/net/proxy/proxy_config_service_linux.h b/net/proxy/proxy_config_service_linux.h
index 90acbf4..07bf8fa 100644
--- a/net/proxy/proxy_config_service_linux.h
+++ b/net/proxy/proxy_config_service_linux.h
@@ -61,7 +61,7 @@ class ProxyConfigServiceLinux : public ProxyConfigService {
virtual MessageLoop* GetNotificationLoop() = 0;
// Returns the data source's name (e.g. "gconf", "KDE", "test").
- // Used only for diagnostic purposes (e.g. LOG(INFO) etc.).
+ // Used only for diagnostic purposes (e.g. VLOG(1) etc.).
virtual const char* GetDataSource() = 0;
// Gets a string type value from gconf and stores it in
diff --git a/net/proxy/proxy_resolver_js_bindings.cc b/net/proxy/proxy_resolver_js_bindings.cc
index 3888663..ae42554 100644
--- a/net/proxy/proxy_resolver_js_bindings.cc
+++ b/net/proxy/proxy_resolver_js_bindings.cc
@@ -71,7 +71,7 @@ class DefaultJSBindings : public ProxyResolverJSBindings {
// Handler for "alert(message)".
virtual void Alert(const string16& message) {
- LOG(INFO) << "PAC-alert: " << message;
+ VLOG(1) << "PAC-alert: " << message;
// Send to the NetLog.
LogEventToCurrentRequestAndGlobally(NetLog::TYPE_PAC_JAVASCRIPT_ALERT,
@@ -142,9 +142,9 @@ class DefaultJSBindings : public ProxyResolverJSBindings {
virtual void OnError(int line_number, const string16& message) {
// Send to the chrome log.
if (line_number == -1)
- LOG(INFO) << "PAC-error: " << message;
+ VLOG(1) << "PAC-error: " << message;
else
- LOG(INFO) << "PAC-error: " << "line: " << line_number << ": " << message;
+ VLOG(1) << "PAC-error: " << "line: " << line_number << ": " << message;
// Send the error to the NetLog.
LogEventToCurrentRequestAndGlobally(
diff --git a/net/proxy/proxy_resolver_js_bindings.h b/net/proxy/proxy_resolver_js_bindings.h
index cbfdb75..860be34 100644
--- a/net/proxy/proxy_resolver_js_bindings.h
+++ b/net/proxy/proxy_resolver_js_bindings.h
@@ -59,8 +59,8 @@ class ProxyResolverJSBindings {
virtual void Shutdown() = 0;
// Creates a default javascript bindings implementation that will:
- // - Send script error messages to both LOG(INFO), and the NetLog.
- // - Send script alert()s to both LOG(INFO), and the NetLog.
+ // - Send script error messages to both VLOG(1) and the NetLog.
+ // - Send script alert()s to both VLOG(1) and the NetLog.
// - Use the provided host resolver to service dnsResolve().
//
// Note that |host_resolver| will be used in sync mode mode.
diff --git a/net/proxy/proxy_resolver_v8_unittest.cc b/net/proxy/proxy_resolver_v8_unittest.cc
index 9e4a5d7..3e61cd7 100644
--- a/net/proxy/proxy_resolver_v8_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -26,7 +26,7 @@ class MockJSBindings : public ProxyResolverJSBindings {
MockJSBindings() : my_ip_address_count(0), my_ip_address_ex_count(0) {}
virtual void Alert(const string16& message) {
- LOG(INFO) << "PAC-alert: " << message; // Helpful when debugging.
+ VLOG(1) << "PAC-alert: " << message; // Helpful when debugging.
alerts.push_back(UTF16ToUTF8(message));
}
@@ -57,7 +57,7 @@ class MockJSBindings : public ProxyResolverJSBindings {
virtual void OnError(int line_number, const string16& message) {
// Helpful when debugging.
- LOG(INFO) << "PAC-error: [" << line_number << "] " << message;
+ VLOG(1) << "PAC-error: [" << line_number << "] " << message;
errors.push_back(UTF16ToUTF8(message));
errors_line_number.push_back(line_number);
diff --git a/net/proxy/proxy_script_fetcher.cc b/net/proxy/proxy_script_fetcher.cc
index 0856430..c920331 100644
--- a/net/proxy/proxy_script_fetcher.cc
+++ b/net/proxy/proxy_script_fetcher.cc
@@ -293,8 +293,8 @@ void ProxyScriptFetcherImpl::OnResponseStarted(URLRequest* request) {
// NOTE about status codes: We are like Firefox 3 in this respect.
// {IE 7, Safari 3, Opera 9.5} do not care about the status code.
if (request->GetResponseCode() != 200) {
- LOG(INFO) << "Fetched PAC script had (bad) status line: "
- << request->response_headers()->GetStatusLine();
+ VLOG(1) << "Fetched PAC script had (bad) status line: "
+ << request->response_headers()->GetStatusLine();
result_code_ = ERR_PAC_STATUS_NOT_OK;
request->Cancel();
return;
@@ -306,8 +306,8 @@ void ProxyScriptFetcherImpl::OnResponseStarted(URLRequest* request) {
std::string mime_type;
cur_request_->GetMimeType(&mime_type);
if (!IsPacMimeType(mime_type)) {
- LOG(INFO) << "Fetched PAC script does not have a proper mime type: "
- << mime_type;
+ VLOG(1) << "Fetched PAC script does not have a proper mime type: "
+ << mime_type;
}
}
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 8584a25..4c27170 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -635,8 +635,8 @@ void ProxyService::OnInitProxyResolverComplete(int result) {
init_proxy_resolver_.reset();
if (result != OK) {
- LOG(INFO) << "Failed configuring with PAC script, falling-back to manual "
- "proxy servers.";
+ VLOG(1) << "Failed configuring with PAC script, falling-back to manual "
+ "proxy servers.";
config_ = fetched_config_;
config_.ClearAutomaticSettings();
}
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index 414d395..6f03706 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -48,54 +48,54 @@ inline char Asciify(char x) {
void DumpData(const char* data, int data_len) {
if (logging::LOG_INFO < logging::GetMinLogLevel())
return;
- DLOG(INFO) << "Length: " << data_len;
+ DVLOG(1) << "Length: " << data_len;
const char* pfx = "Data: ";
if (!data || (data_len <= 0)) {
- DLOG(INFO) << pfx << "<None>";
+ DVLOG(1) << pfx << "<None>";
} else {
int i;
for (i = 0; i <= (data_len - 4); i += 4) {
- DLOG(INFO) << pfx
+ DVLOG(1) << pfx
+ << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0])
+ << AsciifyHigh(data[i + 1]) << AsciifyLow(data[i + 1])
+ << AsciifyHigh(data[i + 2]) << AsciifyLow(data[i + 2])
+ << AsciifyHigh(data[i + 3]) << AsciifyLow(data[i + 3])
+ << " '"
+ << Asciify(data[i + 0])
+ << Asciify(data[i + 1])
+ << Asciify(data[i + 2])
+ << Asciify(data[i + 3])
+ << "'";
+ pfx = " ";
+ }
+ // Take care of any 'trailing' bytes, if data_len was not a multiple of 4.
+ switch (data_len - i) {
+ case 3:
+ DVLOG(1) << pfx
<< AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0])
<< AsciifyHigh(data[i + 1]) << AsciifyLow(data[i + 1])
<< AsciifyHigh(data[i + 2]) << AsciifyLow(data[i + 2])
- << AsciifyHigh(data[i + 3]) << AsciifyLow(data[i + 3])
- << " '"
+ << " '"
<< Asciify(data[i + 0])
<< Asciify(data[i + 1])
<< Asciify(data[i + 2])
- << Asciify(data[i + 3])
- << "'";
- pfx = " ";
- }
- // Take care of any 'trailing' bytes, if data_len was not a multiple of 4.
- switch (data_len - i) {
- case 3:
- DLOG(INFO) << pfx
- << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0])
- << AsciifyHigh(data[i + 1]) << AsciifyLow(data[i + 1])
- << AsciifyHigh(data[i + 2]) << AsciifyLow(data[i + 2])
- << " '"
- << Asciify(data[i + 0])
- << Asciify(data[i + 1])
- << Asciify(data[i + 2])
- << " '";
+ << " '";
break;
case 2:
- DLOG(INFO) << pfx
- << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0])
- << AsciifyHigh(data[i + 1]) << AsciifyLow(data[i + 1])
- << " '"
- << Asciify(data[i + 0])
- << Asciify(data[i + 1])
- << " '";
+ DVLOG(1) << pfx
+ << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0])
+ << AsciifyHigh(data[i + 1]) << AsciifyLow(data[i + 1])
+ << " '"
+ << Asciify(data[i + 0])
+ << Asciify(data[i + 1])
+ << " '";
break;
case 1:
- DLOG(INFO) << pfx
- << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0])
- << " '"
- << Asciify(data[i + 0])
- << " '";
+ DVLOG(1) << pfx
+ << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0])
+ << " '"
+ << Asciify(data[i + 0])
+ << " '";
break;
}
}
@@ -104,13 +104,12 @@ void DumpData(const char* data, int data_len) {
void DumpMockRead(const MockRead& r) {
if (logging::LOG_INFO < logging::GetMinLogLevel())
return;
- DLOG(INFO) << "Async: " << r.async;
- DLOG(INFO) << "Result: " << r.result;
+ DVLOG(1) << "Async: " << r.async
+ << "\nResult: " << r.result;
DumpData(r.data, r.data_len);
const char* stop = (r.sequence_number & MockRead::STOPLOOP) ? " (STOP)" : "";
- DLOG(INFO) << "Stage: " << (r.sequence_number & ~MockRead::STOPLOOP)
- << stop;
- DLOG(INFO) << "Time: " << r.time_stamp.ToInternalValue();
+ DVLOG(1) << "Stage: " << (r.sequence_number & ~MockRead::STOPLOOP) << stop
+ << "\nTime: " << r.time_stamp.ToInternalValue();
}
} // namespace
diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc
index 8e9e675..1d045e1 100644
--- a/net/socket/socks_client_socket.cc
+++ b/net/socket/socks_client_socket.cc
@@ -203,7 +203,7 @@ void SOCKSClientSocket::DoCallback(int result) {
// clear user_callback_ up front.
CompletionCallback* c = user_callback_;
user_callback_ = NULL;
- DLOG(INFO) << "Finished setting up SOCKS handshake";
+ DVLOG(1) << "Finished setting up SOCKS handshake";
c->Run(result);
}
@@ -273,14 +273,14 @@ int SOCKSClientSocket::DoResolveHostComplete(int result) {
// since IPv6 is unsupported by SOCKS4/4a protocol.
struct sockaddr *host_info = addresses_.head()->ai_addr;
if (host_info->sa_family == AF_INET) {
- DLOG(INFO) << "Resolved host. Using SOCKS4 to communicate";
+ DVLOG(1) << "Resolved host. Using SOCKS4 to communicate";
socks_version_ = kSOCKS4;
} else {
- DLOG(INFO) << "Resolved host but to IPv6. Using SOCKS4a to communicate";
+ DVLOG(1) << "Resolved host but to IPv6. Using SOCKS4a to communicate";
socks_version_ = kSOCKS4a;
}
} else {
- DLOG(INFO) << "Could not resolve host. Using SOCKS4a to communicate";
+ DVLOG(1) << "Could not resolve host. Using SOCKS4a to communicate";
socks_version_ = kSOCKS4a;
}
@@ -309,7 +309,7 @@ const std::string SOCKSClientSocket::BuildHandshakeWriteBuffer() const {
reinterpret_cast<struct sockaddr_in*>(ai->ai_addr);
memcpy(&request.ip, &(ipv4_host->sin_addr), sizeof(ipv4_host->sin_addr));
- DLOG(INFO) << "Resolved Host is : " << NetAddressToString(ai);
+ DVLOG(1) << "Resolved Host is : " << NetAddressToString(ai);
} else if (socks_version_ == kSOCKS4a) {
// invalid IP of the form 0.0.0.127
memcpy(&request.ip, kInvalidIp, arraysize(kInvalidIp));
diff --git a/net/socket/ssl_client_socket_mac.cc b/net/socket/ssl_client_socket_mac.cc
index 884555c..9a60907 100644
--- a/net/socket/ssl_client_socket_mac.cc
+++ b/net/socket/ssl_client_socket_mac.cc
@@ -104,9 +104,6 @@ namespace {
const unsigned int kWriteSizePauseLimit = 2 * 1024 * 1024;
const unsigned int kWriteSizeResumeLimit = 1 * 1024 * 1024;
-// You can change this to LOG(WARNING) during development.
-#define SSL_LOG LOG(INFO) << "SSL: "
-
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
// When compiled against the Mac OS X 10.5 SDK, define symbolic constants for
// cipher suites added in Mac OS X 10.6.
@@ -555,7 +552,7 @@ void SSLClientSocketMac::Disconnect() {
SSLClose(ssl_context_);
SSLDisposeContext(ssl_context_);
ssl_context_ = NULL;
- SSL_LOG << "----- Disposed SSLContext";
+ VLOG(1) << "----- Disposed SSLContext";
}
// Shut down anything that may call us back.
@@ -694,7 +691,7 @@ void SSLClientSocketMac::GetSSLCertRequestInfo(
CFArrayRef valid_issuer_names = NULL;
if (SSLCopyDistinguishedNames(ssl_context_, &valid_issuer_names) == noErr &&
valid_issuer_names != NULL) {
- SSL_LOG << "Server has " << CFArrayGetCount(valid_issuer_names)
+ VLOG(1) << "Server has " << CFArrayGetCount(valid_issuer_names)
<< " valid issuer names";
int n = CFArrayGetCount(valid_issuer_names);
for (int i = 0; i < n; i++) {
@@ -716,7 +713,7 @@ void SSLClientSocketMac::GetSSLCertRequestInfo(
X509Certificate::GetSSLClientCertificates(hostname_,
valid_issuers,
&cert_request_info->client_certs);
- SSL_LOG << "Asking user to choose between "
+ VLOG(1) << "Asking user to choose between "
<< cert_request_info->client_certs.size() << " client certs...";
}
@@ -727,7 +724,7 @@ SSLClientSocketMac::GetNextProto(std::string* proto) {
}
int SSLClientSocketMac::InitializeSSLContext() {
- SSL_LOG << "----- InitializeSSLContext";
+ VLOG(1) << "----- InitializeSSLContext";
OSStatus status = noErr;
status = SSLNewContext(false, &ssl_context_);
@@ -975,7 +972,7 @@ int SSLClientSocketMac::DoHandshake() {
if (client_cert_requested_) {
// See if the server aborted due to client cert checking.
if (!ssl_config_.send_client_cert) {
- SSL_LOG << "Server requested SSL cert during handshake";
+ VLOG(1) << "Server requested SSL cert during handshake";
return ERR_SSL_CLIENT_AUTH_CERT_NEEDED;
}
LOG(WARNING) << "Server aborted SSL handshake";
@@ -1002,7 +999,7 @@ int SSLClientSocketMac::DoVerifyCert() {
DCHECK(server_cert_);
- SSL_LOG << "DoVerifyCert...";
+ VLOG(1) << "DoVerifyCert...";
int flags = 0;
if (ssl_config_.rev_checking_enabled)
flags |= X509Certificate::VERIFY_REV_CHECKING_ENABLED;
@@ -1018,7 +1015,7 @@ int SSLClientSocketMac::DoVerifyCertComplete(int result) {
DCHECK(verifier_.get());
verifier_.reset();
- SSL_LOG << "...DoVerifyCertComplete (result=" << result << ")";
+ VLOG(1) << "...DoVerifyCertComplete (result=" << result << ")";
if (IsCertificateError(result) && ssl_config_.IsAllowedBadCert(server_cert_))
result = OK;
@@ -1028,7 +1025,7 @@ int SSLClientSocketMac::DoVerifyCertComplete(int result) {
// asking for one, and abort the connection.
return ERR_SSL_CLIENT_AUTH_CERT_NEEDED;
}
- SSL_LOG << "Handshake finished! (DoVerifyCertComplete)";
+ VLOG(1) << "Handshake finished! (DoVerifyCertComplete)";
if (renegotiating_) {
DidCompleteRenegotiation();
@@ -1047,7 +1044,7 @@ int SSLClientSocketMac::SetClientCert() {
scoped_cftyperef<CFArrayRef> cert_refs(
ssl_config_.client_cert->CreateClientCertificateChain());
- SSL_LOG << "SSLSetCertificate(" << CFArrayGetCount(cert_refs) << " certs)";
+ VLOG(1) << "SSLSetCertificate(" << CFArrayGetCount(cert_refs) << " certs)";
OSStatus result = SSLSetCertificate(ssl_context_, cert_refs);
if (result)
LOG(ERROR) << "SSLSetCertificate returned OSStatus " << result;
@@ -1121,7 +1118,7 @@ void SSLClientSocketMac::DidCompleteRenegotiation() {
int SSLClientSocketMac::DidCompleteHandshake() {
DCHECK(!server_cert_ || renegotiating_);
- SSL_LOG << "Handshake completed, next verify cert";
+ VLOG(1) << "Handshake completed, next verify cert";
scoped_refptr<X509Certificate> new_server_cert =
GetServerCert(ssl_context_);
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index 9766654..39a2774 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -107,18 +107,20 @@ namespace net {
#define GotoState(s) next_handshake_state_ = s
#define LogData(s, len)
#else
-#define EnterFunction(x) LOG(INFO) << (void *)this << " " << __FUNCTION__ << \
- " enter " << x << \
- "; next_handshake_state " << next_handshake_state_
-#define LeaveFunction(x) LOG(INFO) << (void *)this << " " << __FUNCTION__ << \
- " leave " << x << \
- "; next_handshake_state " << next_handshake_state_
-#define GotoState(s) do { LOG(INFO) << (void *)this << " " << __FUNCTION__ << \
- " jump to state " << s; \
- next_handshake_state_ = s; } while (0)
-#define LogData(s, len) LOG(INFO) << (void *)this << " " << __FUNCTION__ << \
- " data [" << std::string(s, len) << "]";
-
+#define EnterFunction(x)\
+ VLOG(1) << (void *)this << " " << __FUNCTION__ << " enter " << x\
+ << "; next_handshake_state " << next_handshake_state_
+#define LeaveFunction(x)\
+ VLOG(1) << (void *)this << " " << __FUNCTION__ << " leave " << x\
+ << "; next_handshake_state " << next_handshake_state_
+#define GotoState(s)\
+ do {\
+ VLOG(1) << (void *)this << " " << __FUNCTION__ << " jump to state " << s;\
+ next_handshake_state_ = s;\
+ } while (0)
+#define LogData(s, len)\
+ VLOG(1) << (void *)this << " " << __FUNCTION__\
+ << " data [" << std::string(s, len) << "]"
#endif
namespace {
@@ -363,7 +365,7 @@ bool IsProblematicComodoEVCACert(const CERTCertificate& cert) {
// http://blogs.msdn.com/b/askie/archive/2009/06/09/my-expired-client-certificates-no-longer-display-when-connecting-to-my-web-server-using-ie8.aspx
BOOL WINAPI ClientCertFindCallback(PCCERT_CONTEXT cert_context,
void* find_arg) {
- LOG(INFO) << "Calling ClientCertFindCallback from _nss";
+ VLOG(1) << "Calling ClientCertFindCallback from _nss";
// Verify the certificate's KU is good.
BYTE key_usage;
if (CertGetIntendedKeyUsage(X509_ASN_ENCODING, cert_context->pCertInfo,
@@ -872,7 +874,7 @@ int SSLClientSocketNSS::InitializeSSLOptions() {
rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_SNAP_START,
SSLConfigService::snap_start_enabled());
if (rv != SECSuccess)
- LOG(INFO) << "SSL_ENABLE_SNAP_START failed. Old system nss?";
+ VLOG(1) << "SSL_ENABLE_SNAP_START failed. Old system nss?";
#endif
#ifdef SSL_ENABLE_RENEGOTIATION
@@ -1245,8 +1247,8 @@ void SSLClientSocketNSS::CheckSecureRenegotiation() const {
if (SSL_HandshakeNegotiatedExtension(nss_fd_, ssl_renegotiation_info_xtn,
&received_renego_info) == SECSuccess &&
!received_renego_info) {
- LOG(INFO) << "The server " << hostname_
- << " does not support the TLS renegotiation_info extension.";
+ VLOG(1) << "The server " << hostname_
+ << " does not support the TLS renegotiation_info extension.";
}
#endif
}
@@ -2052,11 +2054,11 @@ int SSLClientSocketNSS::DoHandshake() {
net_error = ERR_NETNANNY_SSL_INTERCEPTION;
} else {
SaveSnapStartInfo();
- // SSL handshake is completed. It's possible that we mispredicted the NPN
- // agreed protocol. In this case, we've just sent a request in the wrong
- // protocol! The higher levels of this network stack aren't prepared for
- // switching the protocol like that so we make up an error and rely on
- // the fact that the request will be retried.
+ // SSL handshake is completed. It's possible that we mispredicted the
+ // NPN agreed protocol. In this case, we've just sent a request in the
+ // wrong protocol! The higher levels of this network stack aren't
+ // prepared for switching the protocol like that so we make up an error
+ // and rely on the fact that the request will be retried.
if (IsNPNProtocolMispredicted()) {
LOG(WARNING) << "Mispredicted NPN protocol for " << hostname_;
net_error = ERR_SSL_SNAP_START_NPN_MISPREDICTION;
@@ -2379,7 +2381,7 @@ int SSLClientSocketNSS::DoVerifyCertComplete(int result) {
// the cert in the allowed_bad_certs vector.
if (IsCertificateError(result) &&
ssl_config_.IsAllowedBadCert(server_cert_)) {
- LOG(INFO) << "accepting bad SSL certificate, as user told us to";
+ VLOG(1) << "accepting bad SSL certificate, as user told us to";
result = OK;
}
diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc
index 64852f2..bbe3ee4 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -372,7 +372,7 @@ int SSLClientSocketOpenSSL::DoVerifyCertComplete(int result) {
// the cert in the allowed_bad_certs vector.
if (IsCertificateError(result) &&
ssl_config_.IsAllowedBadCert(server_cert_)) {
- LOG(INFO) << "accepting bad SSL certificate, as user told us to";
+ VLOG(1) << "accepting bad SSL certificate, as user told us to";
result = OK;
}
diff --git a/net/socket/tcp_client_socket_libevent.cc b/net/socket/tcp_client_socket_libevent.cc
index f896ac6..aedbf8a 100644
--- a/net/socket/tcp_client_socket_libevent.cc
+++ b/net/socket/tcp_client_socket_libevent.cc
@@ -223,7 +223,7 @@ int TCPClientSocketLibevent::DoConnect() {
socket_, true, MessageLoopForIO::WATCH_WRITE, &write_socket_watcher_,
&write_watcher_)) {
connect_os_error_ = errno;
- DLOG(INFO) << "WatchFileDescriptor failed: " << connect_os_error_;
+ DVLOG(1) << "WatchFileDescriptor failed: " << connect_os_error_;
return MapPosixError(connect_os_error_);
}
@@ -337,14 +337,14 @@ int TCPClientSocketLibevent::Read(IOBuffer* buf,
return nread;
}
if (errno != EAGAIN && errno != EWOULDBLOCK) {
- DLOG(INFO) << "read failed, errno " << errno;
+ DVLOG(1) << "read failed, errno " << errno;
return MapPosixError(errno);
}
if (!MessageLoopForIO::current()->WatchFileDescriptor(
socket_, true, MessageLoopForIO::WATCH_READ,
&read_socket_watcher_, &read_watcher_)) {
- DLOG(INFO) << "WatchFileDescriptor failed on read, errno " << errno;
+ DVLOG(1) << "WatchFileDescriptor failed on read, errno " << errno;
return MapPosixError(errno);
}
@@ -381,7 +381,7 @@ int TCPClientSocketLibevent::Write(IOBuffer* buf,
if (!MessageLoopForIO::current()->WatchFileDescriptor(
socket_, true, MessageLoopForIO::WATCH_WRITE,
&write_socket_watcher_, &write_watcher_)) {
- DLOG(INFO) << "WatchFileDescriptor failed on write, errno " << errno;
+ DVLOG(1) << "WatchFileDescriptor failed on write, errno " << errno;
return MapPosixError(errno);
}
diff --git a/net/socket/tcp_client_socket_win.cc b/net/socket/tcp_client_socket_win.cc
index fc6ca27..9143b81 100644
--- a/net/socket/tcp_client_socket_win.cc
+++ b/net/socket/tcp_client_socket_win.cc
@@ -35,7 +35,7 @@ void AssertEventNotSignaled(WSAEVENT hEvent) {
// This LOG statement is unreachable since we have already crashed, but it
// should prevent the compiler from optimizing away the |wait_rv| and
// |err| variables so they appear nicely on the stack in crash dumps.
- LOG(INFO) << "wait_rv=" << wait_rv << ", err=" << err;
+ VLOG(1) << "wait_rv=" << wait_rv << ", err=" << err;
}
}
diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc
index 95f30ab..aa91962 100644
--- a/net/socket_stream/socket_stream.cc
+++ b/net/socket_stream/socket_stream.cc
@@ -259,7 +259,7 @@ void SocketStream::Finish(int result) {
if (result == OK)
result = ERR_CONNECTION_CLOSED;
DCHECK_EQ(next_state_, STATE_NONE);
- DLOG(INFO) << "Finish result=" << net::ErrorToString(result);
+ DVLOG(1) << "Finish result=" << net::ErrorToString(result);
if (delegate_)
delegate_->OnError(this, result);
@@ -482,7 +482,7 @@ int SocketStream::DoResolveProxyComplete(int result) {
GURL::Replacements repl;
repl.SetSchemeStr(scheme);
proxy_url_ = url_.ReplaceComponents(repl);
- DLOG(INFO) << "Try https proxy: " << proxy_url_;
+ DVLOG(1) << "Try https proxy: " << proxy_url_;
next_state_ = STATE_RESOLVE_PROXY;
return OK;
}
@@ -924,7 +924,7 @@ GURL SocketStream::ProxyAuthOrigin() const {
int SocketStream::HandleAuthChallenge(const HttpResponseHeaders* headers) {
GURL auth_origin(ProxyAuthOrigin());
- LOG(INFO) << "The proxy " << auth_origin << " requested auth";
+ VLOG(1) << "The proxy " << auth_origin << " requested auth";
// TODO(cbentzel): Since SocketStream only suppports basic authentication
// right now, another challenge is always treated as a rejection.
diff --git a/net/socket_stream/socket_stream_unittest.cc b/net/socket_stream/socket_stream_unittest.cc
index 497020d..25ce17b 100644
--- a/net/socket_stream/socket_stream_unittest.cc
+++ b/net/socket_stream/socket_stream_unittest.cc
@@ -117,8 +117,8 @@ class SocketStreamEventRecorder : public net::SocketStream::Delegate {
event->socket->Close();
}
void DoRestartWithAuth(SocketStreamEvent* event) {
- LOG(INFO) << "RestartWithAuth username=" << username_
- << " password=" << password_;
+ VLOG(1) << "RestartWithAuth username=" << username_
+ << " password=" << password_;
event->socket->RestartWithAuth(username_, password_);
}
void SetAuthInfo(const string16& username,
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index af8e305..ea58559 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -32,9 +32,8 @@ int SpdyFramer::spdy_version_ = kSpdyProtocolVersion;
#define CHANGE_STATE(newstate) \
{ \
do { \
- LOG(INFO) << "Changing state from: " \
- << StateToString(state_) \
- << " to " << StateToString(newstate) << "\n"; \
+ VLOG(1) << "Changing state from: " << StateToString(state_) \
+ << " to " << StateToString(newstate); \
state_ = newstate; \
} while (false); \
}
diff --git a/net/test/test_server.cc b/net/test/test_server.cc
index 10f4b2a..c3359a4 100644
--- a/net/test/test_server.cc
+++ b/net/test/test_server.cc
@@ -164,7 +164,7 @@ bool TestServer::Stop() {
base::CloseProcessHandle(process_handle_);
process_handle_ = base::kNullProcessHandle;
} else {
- LOG(INFO) << "Kill failed?";
+ VLOG(1) << "Kill failed?";
}
return ret;
diff --git a/net/third_party/mozilla_security_manager/nsKeygenHandler.cpp b/net/third_party/mozilla_security_manager/nsKeygenHandler.cpp
index 99d5206..e1aa2e6 100644
--- a/net/third_party/mozilla_security_manager/nsKeygenHandler.cpp
+++ b/net/third_party/mozilla_security_manager/nsKeygenHandler.cpp
@@ -155,7 +155,7 @@ std::string GenKeyAndSignChallenge(int key_size_in_bits,
goto failure;
}
- LOG(INFO) << "Creating key pair...";
+ VLOG(1) << "Creating key pair...";
{
base::AutoNSSWriteLock lock;
privateKey = PK11_GenerateKeyPair(slot,
@@ -166,10 +166,10 @@ std::string GenKeyAndSignChallenge(int key_size_in_bits,
PR_TRUE, // isSensitive?
NULL);
}
- LOG(INFO) << "done.";
+ VLOG(1) << "done.";
if (!privateKey) {
- LOG(INFO) << "Generation of Keypair failed!";
+ VLOG(1) << "Generation of Keypair failed!";
isSuccess = false;
goto failure;
}
@@ -248,7 +248,7 @@ std::string GenKeyAndSignChallenge(int key_size_in_bits,
if (!isSuccess) {
LOG(ERROR) << "SSL Keygen failed! (NSS error code " << PR_GetError() << ")";
} else {
- LOG(INFO) << "SSL Keygen succeeded!";
+ VLOG(1) << "SSL Keygen succeeded!";
}
// Do cleanups
diff --git a/net/third_party/mozilla_security_manager/nsNSSCertificateDB.cpp b/net/third_party/mozilla_security_manager/nsNSSCertificateDB.cpp
index e0876f77..f4ec31a 100644
--- a/net/third_party/mozilla_security_manager/nsNSSCertificateDB.cpp
+++ b/net/third_party/mozilla_security_manager/nsNSSCertificateDB.cpp
@@ -115,14 +115,14 @@ bool ImportCACerts(const net::CertificateList& certificates,
if (!CERT_IsCACert(cert->os_cert_handle(), NULL)) {
not_imported->push_back(net::CertDatabase::ImportCertFailure(
cert, net::ERR_IMPORT_CA_CERT_NOT_CA));
- LOG(INFO) << "skipping cert (non-ca)";
+ VLOG(1) << "skipping cert (non-ca)";
continue;
}
if (cert->os_cert_handle()->isperm) {
not_imported->push_back(net::CertDatabase::ImportCertFailure(
cert, net::ERR_IMPORT_CERT_ALREADY_EXISTS));
- LOG(INFO) << "skipping cert (perm)";
+ VLOG(1) << "skipping cert (perm)";
continue;
}
@@ -133,7 +133,7 @@ bool ImportCACerts(const net::CertificateList& certificates,
// public.)
not_imported->push_back(net::CertDatabase::ImportCertFailure(
cert, net::ERR_FAILED));
- LOG(INFO) << "skipping cert (verify) " << PORT_GetError();
+ VLOG(1) << "skipping cert (verify) " << PORT_GetError();
continue;
}
diff --git a/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp b/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp
index eac7ace..35170cc 100644
--- a/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp
+++ b/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp
@@ -97,7 +97,7 @@ nickname_collision(SECItem *old_nick, PRBool *cancel, void *wincx)
}
if (!old_nick)
- LOG(INFO) << "no nickname for cert in PKCS12 file.";
+ VLOG(1) << "no nickname for cert in PKCS12 file.";
nick = CERT_MakeCANickname(cert);
if (!nick) {
@@ -112,7 +112,7 @@ nickname_collision(SECItem *old_nick, PRBool *cancel, void *wincx)
return NULL;
}
- LOG(INFO) << "using nickname " << nick;
+ VLOG(1) << "using nickname " << nick;
ret_nick = PORT_ZNew(SECItem);
if(ret_nick == NULL) {
PORT_Free(nick);
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index c3ce979..c8dd874 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -497,7 +497,7 @@ int URLRequest::Redirect(const GURL& location, int http_status_code) {
"location", location.possibly_invalid_spec()));
}
if (redirect_limit_ <= 0) {
- DLOG(INFO) << "disallowing redirect: exceeds limit";
+ DVLOG(1) << "disallowing redirect: exceeds limit";
return net::ERR_TOO_MANY_REDIRECTS;
}
@@ -505,7 +505,7 @@ int URLRequest::Redirect(const GURL& location, int http_status_code) {
return net::ERR_INVALID_URL;
if (!job_->IsSafeRedirect(location)) {
- DLOG(INFO) << "disallowing redirect: unsafe protocol";
+ DVLOG(1) << "disallowing redirect: unsafe protocol";
return net::ERR_UNSAFE_REDIRECT;
}
diff --git a/net/url_request/url_request_filter.cc b/net/url_request/url_request_filter.cc
index c62e96d..bb947f9 100644
--- a/net/url_request/url_request_filter.cc
+++ b/net/url_request/url_request_filter.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -129,7 +129,7 @@ URLRequestJob* URLRequestFilter::FindRequestHandler(URLRequest* request,
}
}
if (job) {
- DLOG(INFO) << "URLRequestFilter hit for " << request->url().spec();
+ DVLOG(1) << "URLRequestFilter hit for " << request->url().spec();
hit_count_++;
}
return job;
diff --git a/net/websockets/websocket_handshake.cc b/net/websockets/websocket_handshake.cc
index 480e395..f86f6ac 100644
--- a/net/websockets/websocket_handshake.cc
+++ b/net/websockets/websocket_handshake.cc
@@ -93,13 +93,12 @@ int WebSocketHandshake::ReadServerHandshake(const char* data, size_t len) {
if (headers->response_code() != 101) {
mode_ = MODE_FAILED;
- DLOG(INFO) << "Bad response code: " << headers->response_code();
+ DVLOG(1) << "Bad response code: " << headers->response_code();
return eoh;
}
mode_ = MODE_NORMAL;
if (!ProcessHeaders(*headers) || !CheckResponseHeaders()) {
- DLOG(INFO) << "Process Headers failed: "
- << std::string(data, eoh);
+ DVLOG(1) << "Process Headers failed: " << std::string(data, eoh);
mode_ = MODE_FAILED;
return eoh;
}
diff --git a/net/websockets/websocket_handshake_draft75.cc b/net/websockets/websocket_handshake_draft75.cc
index 78805fb..a504267 100644
--- a/net/websockets/websocket_handshake_draft75.cc
+++ b/net/websockets/websocket_handshake_draft75.cc
@@ -83,8 +83,7 @@ int WebSocketHandshakeDraft75::ReadServerHandshake(
return -1;
if (memcmp(p, kUpgradeHeader, kUpgradeHeaderLength)) {
mode_ = MODE_FAILED;
- DLOG(INFO) << "Bad Upgrade Header "
- << std::string(p, kUpgradeHeaderLength);
+ DVLOG(1) << "Bad Upgrade Header " << std::string(p, kUpgradeHeaderLength);
return p - data;
}
p += kUpgradeHeaderLength;
@@ -93,8 +92,8 @@ int WebSocketHandshakeDraft75::ReadServerHandshake(
return -1;
if (memcmp(p, kConnectionHeader, kConnectionHeaderLength)) {
mode_ = MODE_FAILED;
- DLOG(INFO) << "Bad Connection Header "
- << std::string(p, kConnectionHeaderLength);
+ DVLOG(1) << "Bad Connection Header "
+ << std::string(p, kConnectionHeaderLength);
return p - data;
}
p += kConnectionHeaderLength;
@@ -107,8 +106,7 @@ int WebSocketHandshakeDraft75::ReadServerHandshake(
scoped_refptr<HttpResponseHeaders> headers(
new HttpResponseHeaders(HttpUtil::AssembleRawHeaders(data, eoh)));
if (!ProcessHeaders(*headers)) {
- DLOG(INFO) << "Process Headers failed: "
- << std::string(data, eoh);
+ DVLOG(1) << "Process Headers failed: " << std::string(data, eoh);
mode_ = MODE_FAILED;
}
switch (mode_) {
diff --git a/net/websockets/websocket_throttle.cc b/net/websockets/websocket_throttle.cc
index 614990e..2d62815 100644
--- a/net/websockets/websocket_throttle.cc
+++ b/net/websockets/websocket_throttle.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -76,7 +76,7 @@ void WebSocketThrottle::PutInQueue(WebSocketJob* job) {
} else {
iter->second->push_back(job);
job->SetWaiting();
- DLOG(INFO) << "Waiting on " << addrkey;
+ DVLOG(1) << "Waiting on " << addrkey;
}
}
}
diff --git a/net/websockets/websocket_throttle_unittest.cc b/net/websockets/websocket_throttle_unittest.cc
index 6d8c619..c4bf59f 100644
--- a/net/websockets/websocket_throttle_unittest.cc
+++ b/net/websockets/websocket_throttle_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -90,7 +90,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
WebSocketThrottleTest::MockSocketStreamConnect(s1, addr);
DeleteAddrInfo(addr);
- DLOG(INFO) << "socket1";
+ DVLOG(1) << "socket1";
TestCompletionCallback callback_s1;
// Trying to open connection to host1 will start without wait.
EXPECT_EQ(OK, w1->OnStartOpenConnection(s1, &callback_s1));
@@ -110,7 +110,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
WebSocketThrottleTest::MockSocketStreamConnect(s2, addr);
DeleteAddrInfo(addr);
- DLOG(INFO) << "socket2";
+ DVLOG(1) << "socket2";
TestCompletionCallback callback_s2;
// Trying to open connection to host2 will wait for w1.
EXPECT_EQ(ERR_IO_PENDING, w2->OnStartOpenConnection(s2, &callback_s2));
@@ -129,7 +129,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
WebSocketThrottleTest::MockSocketStreamConnect(s3, addr);
DeleteAddrInfo(addr);
- DLOG(INFO) << "socket3";
+ DVLOG(1) << "socket3";
TestCompletionCallback callback_s3;
// Trying to open connection to host3 will wait for w1.
EXPECT_EQ(ERR_IO_PENDING, w3->OnStartOpenConnection(s3, &callback_s3));
@@ -148,7 +148,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
WebSocketThrottleTest::MockSocketStreamConnect(s4, addr);
DeleteAddrInfo(addr);
- DLOG(INFO) << "socket4";
+ DVLOG(1) << "socket4";
TestCompletionCallback callback_s4;
// Trying to open connection to host4 will wait for w1, w2.
EXPECT_EQ(ERR_IO_PENDING, w4->OnStartOpenConnection(s4, &callback_s4));
@@ -166,7 +166,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
WebSocketThrottleTest::MockSocketStreamConnect(s5, addr);
DeleteAddrInfo(addr);
- DLOG(INFO) << "socket5";
+ DVLOG(1) << "socket5";
TestCompletionCallback callback_s5;
// Trying to open connection to host5 will wait for w1, w4
EXPECT_EQ(ERR_IO_PENDING, w5->OnStartOpenConnection(s5, &callback_s5));
@@ -184,7 +184,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
WebSocketThrottleTest::MockSocketStreamConnect(s6, addr);
DeleteAddrInfo(addr);
- DLOG(INFO) << "socket6";
+ DVLOG(1) << "socket6";
TestCompletionCallback callback_s6;
// Trying to open connection to host6 will wait for w1, w4, w5
EXPECT_EQ(ERR_IO_PENDING, w6->OnStartOpenConnection(s6, &callback_s6));
@@ -194,7 +194,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
// 1.2.3.6 | w1 w4 w5 w6
// Receive partial response on w1, still connecting.
- DLOG(INFO) << "socket1 1";
+ DVLOG(1) << "socket1 1";
static const char kHeader[] = "HTTP/1.1 101 WebSocket Protocol\r\n";
w1->OnReceivedData(s1.get(), kHeader, sizeof(kHeader) - 1);
EXPECT_FALSE(callback_s2.have_result());
@@ -204,7 +204,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
EXPECT_FALSE(callback_s6.have_result());
// Receive rest of handshake response on w1.
- DLOG(INFO) << "socket1 2";
+ DVLOG(1) << "socket1 2";
static const char kHeader2[] =
"Upgrade: WebSocket\r\n"
"Connection: Upgrade\r\n"
@@ -226,7 +226,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
// 1.2.3.6 | w4 w5 w6
// Closing s1 doesn't change waiting queue.
- DLOG(INFO) << "socket1 close";
+ DVLOG(1) << "socket1 close";
w1->OnClose(s1.get());
MessageLoopForIO::current()->RunAllPending();
EXPECT_FALSE(callback_s4.have_result());
@@ -237,7 +237,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
// 1.2.3.6 | w4 w5 w6
// w5 can close while waiting in queue.
- DLOG(INFO) << "socket5 close";
+ DVLOG(1) << "socket5 close";
// w5 close() closes SocketStream that change state to STATE_CLOSE, calls
// DoLoop(), so OnClose() callback will be called.
w5->OnClose(s5.get());
@@ -250,7 +250,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
s5->DetachDelegate();
// w6 close abnormally (e.g. renderer finishes) while waiting in queue.
- DLOG(INFO) << "socket6 close abnormally";
+ DVLOG(1) << "socket6 close abnormally";
w6->DetachDelegate();
MessageLoopForIO::current()->RunAllPending();
EXPECT_FALSE(callback_s4.have_result());
@@ -260,7 +260,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
// 1.2.3.6 | w4
// Closing s2 kicks w4 to start connecting.
- DLOG(INFO) << "socket2 close";
+ DVLOG(1) << "socket2 close";
w2->OnClose(s2.get());
MessageLoopForIO::current()->RunAllPending();
EXPECT_TRUE(callback_s4.have_result());
@@ -270,13 +270,13 @@ TEST_F(WebSocketThrottleTest, Throttle) {
// 1.2.3.6 | w4
s2->DetachDelegate();
- DLOG(INFO) << "socket3 close";
+ DVLOG(1) << "socket3 close";
w3->OnClose(s3.get());
MessageLoopForIO::current()->RunAllPending();
s3->DetachDelegate();
w4->OnClose(s4.get());
s4->DetachDelegate();
- DLOG(INFO) << "Done";
+ DVLOG(1) << "Done";
MessageLoopForIO::current()->RunAllPending();
}
@@ -293,15 +293,15 @@ TEST_F(WebSocketThrottleTest, NoThrottleForDuplicateAddress) {
WebSocketThrottleTest::MockSocketStreamConnect(s1, addr);
DeleteAddrInfo(addr);
- DLOG(INFO) << "socket1";
+ DVLOG(1) << "socket1";
TestCompletionCallback callback_s1;
// Trying to open connection to localhost will start without wait.
EXPECT_EQ(OK, w1->OnStartOpenConnection(s1, &callback_s1));
- DLOG(INFO) << "socket1 close";
+ DVLOG(1) << "socket1 close";
w1->OnClose(s1.get());
s1->DetachDelegate();
- DLOG(INFO) << "Done";
+ DVLOG(1) << "Done";
MessageLoopForIO::current()->RunAllPending();
}