diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 21:02:59 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 21:02:59 +0000 |
commit | 9ee9a76a1e9bf4ea2088bbb2986f3cf9b0718a97 (patch) | |
tree | 518de8dde8dfdce71db94ff79f81add215b84582 /chrome | |
parent | c8619f55658bfdbac62ce4d4d391b20f6935a8d5 (diff) | |
download | chromium_src-9ee9a76a1e9bf4ea2088bbb2986f3cf9b0718a97.zip chromium_src-9ee9a76a1e9bf4ea2088bbb2986f3cf9b0718a97.tar.gz chromium_src-9ee9a76a1e9bf4ea2088bbb2986f3cf9b0718a97.tar.bz2 |
Make GetURLForDebugging return a const GURL.
Review URL: http://codereview.chromium.org/326003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/resource_dispatcher.cc | 11 | ||||
-rw-r--r-- | chrome/common/resource_dispatcher_unittest.cc | 8 | ||||
-rw-r--r-- | chrome/common/security_filter_peer.cc | 2 | ||||
-rw-r--r-- | chrome/common/security_filter_peer.h | 2 | ||||
-rw-r--r-- | chrome/plugin/chrome_plugin_host.cc | 4 |
5 files changed, 14 insertions, 13 deletions
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc index 47efd6b..de66f9d 100644 --- a/chrome/common/resource_dispatcher.cc +++ b/chrome/common/resource_dispatcher.cc @@ -316,7 +316,7 @@ void ResourceDispatcher::OnUploadProgress( PendingRequestInfo& request_info = it->second; RESOURCE_LOG("Dispatching upload progress for " << - request_info.peer->GetURLForDebugging()); + request_info.peer->GetURLForDebugging().possibly_invalid_spec()); request_info.peer->OnUploadProgress(position, size); // Acknowlegde reciept @@ -351,7 +351,8 @@ void ResourceDispatcher::OnReceivedResponse( } } - RESOURCE_LOG("Dispatching response for " << peer->GetURLForDebugging()); + RESOURCE_LOG("Dispatching response for " << + peer->GetURLForDebugging().possibly_invalid_spec()); peer->OnReceivedResponse(response_head, false); } @@ -379,7 +380,7 @@ void ResourceDispatcher::OnReceivedData(const IPC::Message& message, if (data_len > 0 && shared_mem.Map(data_len)) { RESOURCE_LOG("Dispatching " << data_len << " bytes for " << - request_info.peer->GetURLForDebugging()); + request_info.peer->GetURLForDebugging().possibly_invalid_spec()); const char* data = static_cast<char*>(shared_mem.memory()); request_info.peer->OnReceivedData(data, data_len); } @@ -401,7 +402,7 @@ void ResourceDispatcher::OnReceivedRedirect( PendingRequestInfo& request_info = it->second; RESOURCE_LOG("Dispatching redirect for " << - request_info.peer->GetURLForDebugging()); + request_info.peer->GetURLForDebugging().possibly_invalid_spec()); if (request_info.peer->OnReceivedRedirect(new_url, info)) { message_sender()->Send( @@ -426,7 +427,7 @@ void ResourceDispatcher::OnRequestComplete(int request_id, webkit_glue::ResourceLoaderBridge::Peer* peer = request_info.peer; RESOURCE_LOG("Dispatching complete for " << - request_info.peer->GetURLForDebugging()); + request_info.peer->GetURLForDebugging().possibly_invalid_spec()); if (status.status() == URLRequestStatus::CANCELED && status.os_error() != net::ERR_ABORTED) { diff --git a/chrome/common/resource_dispatcher_unittest.cc b/chrome/common/resource_dispatcher_unittest.cc index 39464ee..bfdbad5 100644 --- a/chrome/common/resource_dispatcher_unittest.cc +++ b/chrome/common/resource_dispatcher_unittest.cc @@ -57,8 +57,8 @@ class TestRequestCallback : public ResourceLoaderBridge::Peer { complete_ = true; } - virtual std::string GetURLForDebugging() { - return std::string(); + virtual GURL GetURLForDebugging() const { + return GURL(); } const std::string& data() const { @@ -259,8 +259,8 @@ class DeferredResourceLoadingTest : public ResourceDispatcherTest, const std::string& security_info) { } - virtual std::string GetURLForDebugging() { - return std::string(); + virtual GURL GetURLForDebugging() const { + return GURL(); } protected: diff --git a/chrome/common/security_filter_peer.cc b/chrome/common/security_filter_peer.cc index e4f20fc..5c70ce4 100644 --- a/chrome/common/security_filter_peer.cc +++ b/chrome/common/security_filter_peer.cc @@ -126,7 +126,7 @@ void SecurityFilterPeer::OnCompletedRequest(const URLRequestStatus& status, NOTREACHED(); } -std::string SecurityFilterPeer::GetURLForDebugging() { +GURL SecurityFilterPeer::GetURLForDebugging() const { return original_peer_->GetURLForDebugging(); } diff --git a/chrome/common/security_filter_peer.h b/chrome/common/security_filter_peer.h index 431889d..5594376 100644 --- a/chrome/common/security_filter_peer.h +++ b/chrome/common/security_filter_peer.h @@ -48,7 +48,7 @@ class SecurityFilterPeer : public webkit_glue::ResourceLoaderBridge::Peer { virtual void OnReceivedData(const char* data, int len); virtual void OnCompletedRequest(const URLRequestStatus& status, const std::string& security_info); - virtual std::string GetURLForDebugging(); + virtual GURL GetURLForDebugging() const; protected: SecurityFilterPeer(webkit_glue::ResourceLoaderBridge* resource_loader_bridge, diff --git a/chrome/plugin/chrome_plugin_host.cc b/chrome/plugin/chrome_plugin_host.cc index 95a4862..f8b1b8f 100644 --- a/chrome/plugin/chrome_plugin_host.cc +++ b/chrome/plugin/chrome_plugin_host.cc @@ -118,8 +118,8 @@ class PluginRequestHandlerProxy } } - virtual std::string GetURLForDebugging() { - return cprequest_->url; + virtual GURL GetURLForDebugging() const { + return GURL(cprequest_->url); } void set_extra_headers(const std::string& headers) { |