summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-23 01:40:00 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-23 01:40:00 +0000
commit23866704890933c1c1b6d0eb9df33695b998fb64 (patch)
tree18063c078fd74c037b4ec7de977db679d1eb9e6e
parente24c2c9b8b247f53ac3f522a77625a84958866ab (diff)
downloadchromium_src-23866704890933c1c1b6d0eb9df33695b998fb64.zip
chromium_src-23866704890933c1c1b6d0eb9df33695b998fb64.tar.gz
chromium_src-23866704890933c1c1b6d0eb9df33695b998fb64.tar.bz2
Convert LOG(INFO) to VLOG(1) - chrome/browser/renderer_host/.
Also converts RESOURCE_LOG() to VLOG(1) since VLOG is configurable on a per-module basis. BUG=none TEST=none Review URL: http://codereview.chromium.org/4006001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63613 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.cc2
-rw-r--r--chrome/browser/renderer_host/offline_resource_handler.cc5
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc12
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.cc6
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.cc53
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc2
-rw-r--r--chrome/browser/renderer_host/socket_stream_dispatcher_host.cc31
-rw-r--r--chrome/browser/renderer_host/socket_stream_host.cc21
8 files changed, 57 insertions, 75 deletions
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc
index d534042..0a141b0 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.cc
+++ b/chrome/browser/renderer_host/buffered_resource_handler.cc
@@ -174,7 +174,7 @@ bool BufferedResourceHandler::DelayResponse() {
// is. That means we need to delay sending the ResponseStarted message
// over the IPC channel.
sniff_content_ = true;
- LOG(INFO) << "To buffer: " << request_->url().spec();
+ VLOG(1) << "To buffer: " << request_->url().spec();
return true;
}
diff --git a/chrome/browser/renderer_host/offline_resource_handler.cc b/chrome/browser/renderer_host/offline_resource_handler.cc
index 68a036d..ba94bee 100644
--- a/chrome/browser/renderer_host/offline_resource_handler.cc
+++ b/chrome/browser/renderer_host/offline_resource_handler.cc
@@ -68,7 +68,7 @@ bool OfflineResourceHandler::OnWillStart(int request_id,
if (ShouldShowOfflinePage(url)) {
deferred_request_id_ = request_id;
deferred_url_ = url;
- DLOG(INFO) << "WillStart: this=" << this << ", request id=" << request_id;
+ DVLOG(1) << "WillStart: this=" << this << ", request id=" << request_id;
AddRef(); // Balanced with OnBlockingPageComplete
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
@@ -148,8 +148,7 @@ void OfflineResourceHandler::Resume() {
DCHECK_NE(request_id, -1);
bool defer = false;
- DLOG(INFO) << "Resume load: this=" << this
- << ", request id=" << request_id;
+ DVLOG(1) << "Resume load: this=" << this << ", request id=" << request_id;
next_handler_->OnWillStart(request_id, url, &defer);
if (!defer)
rdh_->StartDeferredRequest(process_host_id_, request_id);
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 3781bed..b8508dc 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -89,7 +89,7 @@ void FilterURL(ChildProcessSecurityPolicy* policy, int renderer_id, GURL* url) {
// If this renderer is not permitted to request this URL, we invalidate the
// URL. This prevents us from storing the blocked URL and becoming confused
// later.
- LOG(INFO) << "Blocked URL " << url->spec();
+ VLOG(1) << "Blocked URL " << url->spec();
*url = GURL();
}
}
@@ -1192,11 +1192,11 @@ void RenderViewHost::OnMsgDidFailProvisionalLoadWithError(
int error_code,
const GURL& url,
bool showing_repost_interstitial) {
- LOG(INFO) << "Failed Provisional Load: " << url.possibly_invalid_spec()
- << ", error_code: " << error_code
- << " is_main_frame: " << is_main_frame
- << " showing_repost_interstitial: " << showing_repost_interstitial
- << " frame_id: " << frame_id;
+ VLOG(1) << "Failed Provisional Load: " << url.possibly_invalid_spec()
+ << ", error_code: " << error_code
+ << " is_main_frame: " << is_main_frame
+ << " showing_repost_interstitial: " << showing_repost_interstitial
+ << " frame_id: " << frame_id;
GURL validated_url(url);
FilterURL(ChildProcessSecurityPolicy::GetInstance(),
process()->id(), &validated_url);
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
index 5f4a843..2f5a7e9 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -353,9 +353,9 @@ class RenderWidgetHostViewGtkWidget {
static gboolean ClientEvent(GtkWidget* widget, GdkEventClient* event,
RenderWidgetHostViewGtk* host_view) {
- LOG(INFO) << "client event type: " << event->message_type
- << " data_format: " << event->data_format
- << " data: " << event->data.l;
+ VLOG(1) << "client event type: " << event->message_type
+ << " data_format: " << event->data_format
+ << " data: " << event->data.l;
return true;
}
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index a17b12b7..b9d75b7 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -78,15 +78,6 @@
#include "chrome/browser/renderer_host/offline_resource_handler.h"
#endif
-// Uncomment to enable logging of request traffic.
-// #define LOG_RESOURCE_DISPATCHER_REQUESTS
-
-#ifdef LOG_RESOURCE_DISPATCHER_REQUESTS
-# define RESOURCE_LOG(stuff) LOG(INFO) << stuff
-#else
-# define RESOURCE_LOG(stuff)
-#endif
-
using base::Time;
using base::TimeDelta;
using base::TimeTicks;
@@ -143,8 +134,8 @@ bool ShouldServiceRequest(ChildProcessInfo::ProcessType process_type,
// Check if the renderer is permitted to request the requested URL.
if (!policy->CanRequestURL(child_id, request_data.url)) {
- LOG(INFO) << "Denied unauthorized request for " <<
- request_data.url.possibly_invalid_spec();
+ VLOG(1) << "Denied unauthorized request for "
+ << request_data.url.possibly_invalid_spec();
return false;
}
@@ -462,7 +453,7 @@ void ResourceDispatcherHost::BeginRequest(
if ((load_flags & net::LOAD_REPORT_RAW_HEADERS)
&& !ChildProcessSecurityPolicy::GetInstance()->
CanReadRawCookies(child_id)) {
- LOG(INFO) << "Denied unathorized request for raw headers";
+ VLOG(1) << "Denied unathorized request for raw headers";
load_flags &= ~net::LOAD_REPORT_RAW_HEADERS;
}
@@ -704,8 +695,8 @@ void ResourceDispatcherHost::BeginDownload(
// Check if the renderer is permitted to request the requested URL.
if (!ChildProcessSecurityPolicy::GetInstance()->
CanRequestURL(child_id, url)) {
- LOG(INFO) << "Denied unauthorized download request for " <<
- url.possibly_invalid_spec();
+ VLOG(1) << "Denied unauthorized download request for "
+ << url.possibly_invalid_spec();
return;
}
@@ -733,8 +724,8 @@ void ResourceDispatcherHost::BeginDownload(
}
if (!URLRequest::IsHandledURL(url)) {
- LOG(INFO) << "Download request for unsupported protocol: " <<
- url.possibly_invalid_spec();
+ VLOG(1) << "Download request for unsupported protocol: "
+ << url.possibly_invalid_spec();
return;
}
@@ -876,7 +867,7 @@ void ResourceDispatcherHost::PauseRequest(int child_id,
}
info->set_pause_count(pause_count);
- RESOURCE_LOG("To pause (" << pause << "): " << i->second->url().spec());
+ VLOG(1) << "To pause (" << pause << "): " << i->second->url().spec();
// If we're resuming, kick the request to start reading again. Run the read
// asynchronously to avoid recursion problems.
@@ -1006,7 +997,7 @@ void ResourceDispatcherHost::RemovePendingRequest(
void ResourceDispatcherHost::OnReceivedRedirect(URLRequest* request,
const GURL& new_url,
bool* defer_redirect) {
- RESOURCE_LOG("OnReceivedRedirect: " << request->url().spec());
+ VLOG(1) << "OnReceivedRedirect: " << request->url().spec();
ResourceDispatcherHostRequestInfo* info = InfoForRequest(request);
DCHECK(request->status().is_success());
@@ -1014,8 +1005,8 @@ void ResourceDispatcherHost::OnReceivedRedirect(URLRequest* request,
if (info->process_type() != ChildProcessInfo::PLUGIN_PROCESS &&
!ChildProcessSecurityPolicy::GetInstance()->
CanRequestURL(info->child_id(), new_url)) {
- LOG(INFO) << "Denied unauthorized request for " <<
- new_url.possibly_invalid_spec();
+ VLOG(1) << "Denied unauthorized request for "
+ << new_url.possibly_invalid_spec();
// Tell the renderer that this request was disallowed.
CancelRequestInternal(request, false);
@@ -1086,7 +1077,7 @@ void ResourceDispatcherHost::OnSSLCertificateError(
void ResourceDispatcherHost::OnSetCookie(URLRequest* request,
const std::string& cookie_line,
bool blocked_by_policy) {
- RESOURCE_LOG("OnSetCookie: " << request->url().spec());
+ VLOG(1) << "OnSetCookie: " << request->url().spec();
int render_process_id, render_view_id;
if (!RenderViewForRequest(request, &render_process_id, &render_view_id))
@@ -1099,10 +1090,10 @@ void ResourceDispatcherHost::OnSetCookie(URLRequest* request,
}
void ResourceDispatcherHost::OnResponseStarted(URLRequest* request) {
- RESOURCE_LOG("OnResponseStarted: " << request->url().spec());
+ VLOG(1) << "OnResponseStarted: " << request->url().spec();
ResourceDispatcherHostRequestInfo* info = InfoForRequest(request);
if (PauseRequestIfNeeded(info)) {
- RESOURCE_LOG("OnResponseStarted pausing: " << request->url().spec());
+ VLOG(1) << "OnResponseStarted pausing: " << request->url().spec();
return;
}
@@ -1118,7 +1109,7 @@ void ResourceDispatcherHost::OnResponseStarted(URLRequest* request) {
} else {
// Check if the handler paused the request in their OnResponseStarted.
if (PauseRequestIfNeeded(info)) {
- RESOURCE_LOG("OnResponseStarted pausing2: " << request->url().spec());
+ VLOG(1) << "OnResponseStarted pausing2: " << request->url().spec();
return;
}
@@ -1176,7 +1167,7 @@ void ResourceDispatcherHost::CancelRequest(int child_id,
void ResourceDispatcherHost::CancelRequestInternal(URLRequest* request,
bool from_renderer) {
- RESOURCE_LOG("CancelRequest: " << request->url().spec());
+ VLOG(1) << "CancelRequest: " << request->url().spec();
// WebKit will send us a cancel for downloads since it no longer handles them.
// In this case, ignore the cancel since we handle downloads in the browser.
@@ -1347,7 +1338,7 @@ void ResourceDispatcherHost::ResumeRequest(const GlobalRequestID& request_id) {
if (!info->is_paused())
return;
- RESOURCE_LOG("Resuming: " << i->second->url().spec());
+ VLOG(1) << "Resuming: " << i->second->url().spec();
info->set_is_paused(false);
@@ -1395,7 +1386,7 @@ bool ResourceDispatcherHost::Read(URLRequest* request, int* bytes_read) {
void ResourceDispatcherHost::OnReadCompleted(URLRequest* request,
int bytes_read) {
DCHECK(request);
- RESOURCE_LOG("OnReadCompleted: " << request->url().spec());
+ VLOG(1) << "OnReadCompleted: " << request->url().spec();
ResourceDispatcherHostRequestInfo* info = InfoForRequest(request);
// OnReadCompleted can be called without Read (e.g., for chrome:// URLs).
@@ -1404,7 +1395,7 @@ void ResourceDispatcherHost::OnReadCompleted(URLRequest* request,
if (PauseRequestIfNeeded(info)) {
info->set_paused_read_bytes(bytes_read);
- RESOURCE_LOG("OnReadCompleted pausing: " << request->url().spec());
+ VLOG(1) << "OnReadCompleted pausing: " << request->url().spec();
return;
}
@@ -1434,8 +1425,8 @@ void ResourceDispatcherHost::OnReadCompleted(URLRequest* request,
if (PauseRequestIfNeeded(info)) {
info->set_paused_read_bytes(bytes_read);
- RESOURCE_LOG("OnReadCompleted (CompleteRead) pausing: " <<
- request->url().spec());
+ VLOG(1) << "OnReadCompleted (CompleteRead) pausing: "
+ << request->url().spec();
return;
}
@@ -1463,7 +1454,7 @@ bool ResourceDispatcherHost::CompleteRead(URLRequest* request,
}
void ResourceDispatcherHost::OnResponseCompleted(URLRequest* request) {
- RESOURCE_LOG("OnResponseCompleted: " << request->url().spec());
+ VLOG(1) << "OnResponseCompleted: " << request->url().spec();
ResourceDispatcherHostRequestInfo* info = InfoForRequest(request);
// If the load for a main frame has failed, track it in a histogram,
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index 5c853e9..c201a89 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -1492,7 +1492,7 @@ void ResourceMessageFilter::OnKeygen(uint32 key_size_index,
return;
}
- LOG(INFO) << "Dispatching keygen task to worker pool.";
+ VLOG(1) << "Dispatching keygen task to worker pool.";
// Dispatch to worker pool, so we do not block the IO thread.
if (!WorkerPool::PostTask(
FROM_HERE,
diff --git a/chrome/browser/renderer_host/socket_stream_dispatcher_host.cc b/chrome/browser/renderer_host/socket_stream_dispatcher_host.cc
index b99e70d..6fa3fb8 100644
--- a/chrome/browser/renderer_host/socket_stream_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/socket_stream_dispatcher_host.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.
@@ -69,9 +69,8 @@ void SocketStreamDispatcherHost::OnConnected(net::SocketStream* socket,
SocketStreamHost::GetSocketStreamHost(socket);
DCHECK(socket_stream_host);
int socket_id = socket_stream_host->socket_id();
- DLOG(INFO) << "SocketStreamDispatcherHost::OnConnected socket_id="
- << socket_id
- << " max_pending_send_allowed=" << max_pending_send_allowed;
+ DVLOG(1) << "SocketStreamDispatcherHost::OnConnected socket_id=" << socket_id
+ << " max_pending_send_allowed=" << max_pending_send_allowed;
if (socket_id == chrome_common_net::kNoSocketId) {
LOG(ERROR) << "NoSocketId in OnConnected";
return;
@@ -88,9 +87,8 @@ void SocketStreamDispatcherHost::OnSentData(net::SocketStream* socket,
SocketStreamHost::GetSocketStreamHost(socket);
DCHECK(socket_stream_host);
int socket_id = socket_stream_host->socket_id();
- DLOG(INFO) << "SocketStreamDispatcherHost::OnSentData socket_id="
- << socket_id
- << " amount_sent=" << amount_sent;
+ DVLOG(1) << "SocketStreamDispatcherHost::OnSentData socket_id=" << socket_id
+ << " amount_sent=" << amount_sent;
if (socket_id == chrome_common_net::kNoSocketId) {
LOG(ERROR) << "NoSocketId in OnReceivedData";
return;
@@ -107,8 +105,8 @@ void SocketStreamDispatcherHost::OnReceivedData(
SocketStreamHost::GetSocketStreamHost(socket);
DCHECK(socket_stream_host);
int socket_id = socket_stream_host->socket_id();
- DLOG(INFO) << "SocketStreamDispatcherHost::OnReceiveData socket_id="
- << socket_id;
+ DVLOG(1) << "SocketStreamDispatcherHost::OnReceiveData socket_id="
+ << socket_id;
if (socket_id == chrome_common_net::kNoSocketId) {
LOG(ERROR) << "NoSocketId in OnReceivedData";
return;
@@ -124,8 +122,7 @@ void SocketStreamDispatcherHost::OnClose(net::SocketStream* socket) {
SocketStreamHost::GetSocketStreamHost(socket);
DCHECK(socket_stream_host);
int socket_id = socket_stream_host->socket_id();
- DLOG(INFO) << "SocketStreamDispatcherHost::OnClosed socket_id="
- << socket_id;
+ DVLOG(1) << "SocketStreamDispatcherHost::OnClosed socket_id=" << socket_id;
if (socket_id == chrome_common_net::kNoSocketId) {
LOG(ERROR) << "NoSocketId in OnClose";
return;
@@ -135,8 +132,8 @@ void SocketStreamDispatcherHost::OnClose(net::SocketStream* socket) {
// Message handlers called by OnMessageReceived.
void SocketStreamDispatcherHost::OnConnect(const GURL& url, int socket_id) {
- DLOG(INFO) << "SocketStreamDispatcherHost::OnConnect url=" << url
- << " socket_id=" << socket_id;
+ DVLOG(1) << "SocketStreamDispatcherHost::OnConnect url=" << url
+ << " socket_id=" << socket_id;
DCHECK_NE(chrome_common_net::kNoSocketId, socket_id);
DCHECK(receiver_);
if (LookupHostMap(receiver_->id(), socket_id)) {
@@ -148,13 +145,12 @@ void SocketStreamDispatcherHost::OnConnect(const GURL& url, int socket_id) {
new SocketStreamHost(this, receiver_, socket_id);
AddHostMap(receiver_->id(), socket_id, socket_stream_host);
socket_stream_host->Connect(url);
- DLOG(INFO) << "SocketStreamDispatcherHost::OnConnect -> " << socket_id;
+ DVLOG(1) << "SocketStreamDispatcherHost::OnConnect -> " << socket_id;
}
void SocketStreamDispatcherHost::OnSendData(
int socket_id, const std::vector<char>& data) {
- DLOG(INFO) << "SocketStreamDispatcherHost::OnSendData socket_id="
- << socket_id;
+ DVLOG(1) << "SocketStreamDispatcherHost::OnSendData socket_id=" << socket_id;
DCHECK(receiver_);
SocketStreamHost* socket_stream_host =
LookupHostMap(receiver_->id(), socket_id);
@@ -170,8 +166,7 @@ void SocketStreamDispatcherHost::OnSendData(
}
void SocketStreamDispatcherHost::OnCloseReq(int socket_id) {
- DLOG(INFO) << "SocketStreamDispatcherHost::OnCloseReq socket_id="
- << socket_id;
+ DVLOG(1) << "SocketStreamDispatcherHost::OnCloseReq socket_id=" << socket_id;
DCHECK(receiver_);
SocketStreamHost* socket_stream_host =
LookupHostMap(receiver_->id(), socket_id);
diff --git a/chrome/browser/renderer_host/socket_stream_host.cc b/chrome/browser/renderer_host/socket_stream_host.cc
index 51f7ec3..a6f8ddd 100644
--- a/chrome/browser/renderer_host/socket_stream_host.cc
+++ b/chrome/browser/renderer_host/socket_stream_host.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.
@@ -31,7 +31,7 @@ SocketStreamHost::SocketStreamHost(
receiver_(receiver),
socket_id_(socket_id) {
DCHECK_NE(socket_id_, chrome_common_net::kNoSocketId);
- LOG(INFO) << "SocketStreamHost: socket_id=" << socket_id_;
+ VLOG(1) << "SocketStreamHost: socket_id=" << socket_id_;
}
/* static */
@@ -46,15 +46,14 @@ SocketStreamHost::GetSocketStreamHost(net::SocketStream* socket) {
}
SocketStreamHost::~SocketStreamHost() {
- LOG(INFO) << "SocketStreamHost destructed socket_id=" << socket_id_;
- if (!receiver_->Send(new ViewMsg_SocketStream_Closed(socket_id_))) {
+ VLOG(1) << "SocketStreamHost destructed socket_id=" << socket_id_;
+ if (!receiver_->Send(new ViewMsg_SocketStream_Closed(socket_id_)))
LOG(ERROR) << "ViewMsg_SocketStream_Closed failed.";
- }
socket_->DetachDelegate();
}
void SocketStreamHost::Connect(const GURL& url) {
- LOG(INFO) << "SocketStreamHost::Connect url=" << url;
+ VLOG(1) << "SocketStreamHost::Connect url=" << url;
socket_ = net::SocketStreamJob::CreateSocketStreamJob(url, delegate_);
URLRequestContextGetter* context_getter = Profile::GetDefaultRequestContext();
if (context_getter)
@@ -64,17 +63,15 @@ void SocketStreamHost::Connect(const GURL& url) {
}
bool SocketStreamHost::SendData(const std::vector<char>& data) {
- LOG(INFO) << "SocketStreamHost::SendData";
- if (!socket_)
- return false;
- return socket_->SendData(&data[0], data.size());
+ VLOG(1) << "SocketStreamHost::SendData";
+ return socket_ && socket_->SendData(&data[0], data.size());
}
void SocketStreamHost::Close() {
- LOG(INFO) << "SocketStreamHost::Close";
+ VLOG(1) << "SocketStreamHost::Close";
if (!socket_)
return;
- return socket_->Close();
+ socket_->Close();
}
bool SocketStreamHost::Connected(int max_pending_send_allowed) {