Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6807)

Unified Diff: chrome/common/resource_dispatcher.cc

Issue 3941001: Convert LOG(INFO) to VLOG(1) - chrome/common/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/notification_service.cc ('k') | chrome/common/sandbox_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/resource_dispatcher.cc
===================================================================
--- chrome/common/resource_dispatcher.cc (revision 63075)
+++ chrome/common/resource_dispatcher.cc (working copy)
@@ -24,15 +24,6 @@
#include "webkit/glue/resource_type.h"
#include "webkit/glue/webkit_glue.h"
-// Uncomment to enable logging of request traffic
-// #define LOG_RESOURCE_REQUESTS
-
-#ifdef LOG_RESOURCE_REQUESTS
-# define RESOURCE_LOG(stuff) LOG(INFO) << stuff
-#else
-# define RESOURCE_LOG(stuff)
-#endif
-
// Each resource request is assigned an ID scoped to this process.
static int MakeRequestID() {
// NOTE: The resource_dispatcher_host also needs probably unique
@@ -68,10 +59,6 @@
virtual void SetDefersLoading(bool value);
virtual void SyncLoad(SyncLoadResponse* response);
-#ifdef LOG_RESOURCE_REQUESTS
- const std::string& url() const { return url_; }
-#endif
-
private:
ResourceLoaderBridge::Peer* peer_;
@@ -89,11 +76,6 @@
// The routing id used when sending IPC messages.
int routing_id_;
-#ifdef LOG_RESOURCE_REQUESTS
- // indicates the URL of this resource request for help debugging
- std::string url_;
-#endif
-
// The following two members are specified if the request is initiated by
// a plugin like Gears.
@@ -131,10 +113,6 @@
request_.download_to_file = request_info.download_to_file;
request_.host_renderer_id = host_renderer_id_;
request_.host_render_view_id = host_render_view_id_;
-
-#ifdef LOG_RESOURCE_REQUESTS
- url_ = request_.url.possibly_invalid_spec();
-#endif
}
IPCResourceLoaderBridge::~IPCResourceLoaderBridge() {
@@ -199,8 +177,6 @@
return false;
}
- RESOURCE_LOG("Starting request for " << url_);
-
peer_ = peer;
// generate the request ID, and append it to the message
@@ -217,8 +193,6 @@
return;
}
- RESOURCE_LOG("Canceling request for " << url_);
-
dispatcher_->CancelPendingRequest(routing_id_, request_id_);
// We can't remove the request ID from the resource dispatcher because more
@@ -242,8 +216,6 @@
return;
}
- RESOURCE_LOG("Making sync request for " << url_);
-
request_id_ = MakeRequestID();
SyncLoadResult result;
@@ -343,8 +315,6 @@
if (!request_info)
return;
- RESOURCE_LOG("Dispatching upload progress for " <<
- request_info->peer->GetURLForDebugging().possibly_invalid_spec());
request_info->peer->OnUploadProgress(position, size);
// Acknowledge receipt
@@ -367,8 +337,6 @@
request_info->peer = new_peer;
}
- RESOURCE_LOG("Dispatching response for " <<
- request_info->peer->GetURLForDebugging().possibly_invalid_spec());
request_info->peer->OnReceivedResponse(response_head, false);
}
@@ -378,11 +346,8 @@
if (!request_info)
return;
- if (data.size()) {
- RESOURCE_LOG("Dispatching " << data.size() << " metadata bytes for " <<
- request_info->peer->GetURLForDebugging().possibly_invalid_spec());
+ if (data.size())
request_info->peer->OnReceivedCachedMetadata(&data.front(), data.size());
- }
}
void ResourceDispatcher::OnReceivedData(const IPC::Message& message,
@@ -402,8 +367,6 @@
return;
if (data_len > 0 && shared_mem.Map(data_len)) {
- RESOURCE_LOG("Dispatching " << data_len << " bytes for " <<
- request_info->peer->GetURLForDebugging().possibly_invalid_spec());
const char* data = static_cast<char*>(shared_mem.memory());
request_info->peer->OnReceivedData(data, data_len);
}
@@ -420,8 +383,6 @@
if (!request_info)
return;
- RESOURCE_LOG("Dispatching " << data_len << " downloaded for " <<
- request_info->peer->GetURLForDebugging().possibly_invalid_spec());
darin (slow to review) 2010/10/21 23:31:02 we can probably delete GetURLForDebugging() now.
request_info->peer->OnDownloadedData(data_len);
}
@@ -434,10 +395,6 @@
if (!request_info)
return;
- RESOURCE_LOG(
- "Dispatching redirect for " <<
- request_info->peer->GetURLForDebugging().possibly_invalid_spec());
-
bool has_new_first_party_for_cookies = false;
GURL new_first_party_for_cookies;
if (request_info->peer->OnReceivedRedirect(new_url, info,
@@ -462,9 +419,6 @@
webkit_glue::ResourceLoaderBridge::Peer* peer = request_info->peer;
- RESOURCE_LOG("Dispatching complete for " <<
- peer->GetURLForDebugging().possibly_invalid_spec());
-
if (status.status() == URLRequestStatus::CANCELED &&
status.os_error() != net::ERR_ABORTED) {
// Resource canceled with a specific error are filtered.
« no previous file with comments | « chrome/common/notification_service.cc ('k') | chrome/common/sandbox_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698