summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-23 01:40:11 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-23 01:40:11 +0000
commit6a558a36f77d504f7fdf21c1e4d0ad63caa5909a (patch)
tree5b530d60155c03aabfff982db1476f2fdd4861e6
parent23866704890933c1c1b6d0eb9df33695b998fb64 (diff)
downloadchromium_src-6a558a36f77d504f7fdf21c1e4d0ad63caa5909a.zip
chromium_src-6a558a36f77d504f7fdf21c1e4d0ad63caa5909a.tar.gz
chromium_src-6a558a36f77d504f7fdf21c1e4d0ad63caa5909a.tar.bz2
Remove GetURLForDebugging().
BUG=none TEST=none Review URL: http://codereview.chromium.org/4071004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63614 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/extensions/extension_localization_peer.cc4
-rw-r--r--chrome/common/extensions/extension_localization_peer.h1
-rw-r--r--chrome/common/extensions/extension_localization_peer_unittest.cc5
-rw-r--r--chrome/common/resource_dispatcher_unittest.cc8
-rw-r--r--chrome/common/security_filter_peer.cc4
-rw-r--r--chrome/common/security_filter_peer.h1
-rw-r--r--chrome/plugin/chrome_plugin_host.cc4
-rw-r--r--webkit/glue/media/buffered_data_source.h1
-rw-r--r--webkit/glue/media/buffered_data_source_unittest.cc1
-rw-r--r--webkit/glue/media/simple_data_source.cc12
-rw-r--r--webkit/glue/media/simple_data_source.h1
-rw-r--r--webkit/glue/resource_loader_bridge.h4
-rw-r--r--webkit/glue/weburlloader_impl.cc7
13 files changed, 4 insertions, 49 deletions
diff --git a/chrome/common/extensions/extension_localization_peer.cc b/chrome/common/extensions/extension_localization_peer.cc
index 06e0317..e04bd0b 100644
--- a/chrome/common/extensions/extension_localization_peer.cc
+++ b/chrome/common/extensions/extension_localization_peer.cc
@@ -90,10 +90,6 @@ void ExtensionLocalizationPeer::OnCompletedRequest(
original_peer_->OnCompletedRequest(status, security_info, completion_time);
}
-GURL ExtensionLocalizationPeer::GetURLForDebugging() const {
- return original_peer_->GetURLForDebugging();
-}
-
void ExtensionLocalizationPeer::ReplaceMessages() {
if (!message_sender_ || data_.empty())
return;
diff --git a/chrome/common/extensions/extension_localization_peer.h b/chrome/common/extensions/extension_localization_peer.h
index b2b7c7a..1274421 100644
--- a/chrome/common/extensions/extension_localization_peer.h
+++ b/chrome/common/extensions/extension_localization_peer.h
@@ -45,7 +45,6 @@ class ExtensionLocalizationPeer
virtual void OnCompletedRequest(const URLRequestStatus& status,
const std::string& security_info,
const base::Time& completion_time);
- virtual GURL GetURLForDebugging() const;
private:
friend class ExtensionLocalizationPeerTest;
diff --git a/chrome/common/extensions/extension_localization_peer_unittest.cc b/chrome/common/extensions/extension_localization_peer_unittest.cc
index bc6f73f..dc67d5b 100644
--- a/chrome/common/extensions/extension_localization_peer_unittest.cc
+++ b/chrome/common/extensions/extension_localization_peer_unittest.cc
@@ -72,7 +72,6 @@ class MockResourceLoaderBridgePeer
const URLRequestStatus& status,
const std::string& security_info,
const base::Time& completion_time));
- MOCK_CONST_METHOD0(GetURLForDebugging, GURL());
private:
DISALLOW_COPY_AND_ASSIGN(MockResourceLoaderBridgePeer);
@@ -153,7 +152,6 @@ TEST_F(ExtensionLocalizationPeerTest, OnCompletedRequestEmptyData) {
// It will self-delete once it exits OnCompletedRequest.
ExtensionLocalizationPeer* filter_peer = filter_peer_.release();
- EXPECT_CALL(*original_peer_, GetURLForDebugging()).Times(0);
EXPECT_CALL(*original_peer_, OnReceivedData(_, _)).Times(0);
EXPECT_CALL(*sender_, Send(_)).Times(0);
@@ -172,7 +170,6 @@ TEST_F(ExtensionLocalizationPeerTest, OnCompletedRequestNoCatalogs) {
SetData(filter_peer, "some text");
- EXPECT_CALL(*original_peer_, GetURLForDebugging()).Times(0);
EXPECT_CALL(*sender_, Send(_));
std::string data = GetData(filter_peer);
@@ -208,7 +205,6 @@ TEST_F(ExtensionLocalizationPeerTest, OnCompletedRequestWithCatalogs) {
SetData(filter_peer, "some __MSG_text__");
- EXPECT_CALL(*original_peer_, GetURLForDebugging()).Times(0);
// We already have messages in memory, Send will be skipped.
EXPECT_CALL(*sender_, Send(_)).Times(0);
@@ -240,7 +236,6 @@ TEST_F(ExtensionLocalizationPeerTest, OnCompletedRequestReplaceMessagesFails) {
std::string message("some __MSG_missing_message__");
SetData(filter_peer, message);
- EXPECT_CALL(*original_peer_, GetURLForDebugging()).Times(0);
// We already have messages in memory, Send will be skipped.
EXPECT_CALL(*sender_, Send(_)).Times(0);
diff --git a/chrome/common/resource_dispatcher_unittest.cc b/chrome/common/resource_dispatcher_unittest.cc
index 8e31ee9..75fdb08 100644
--- a/chrome/common/resource_dispatcher_unittest.cc
+++ b/chrome/common/resource_dispatcher_unittest.cc
@@ -69,10 +69,6 @@ class TestRequestCallback : public ResourceLoaderBridge::Peer {
complete_ = true;
}
- virtual GURL GetURLForDebugging() const {
- return GURL();
- }
-
const std::string& data() const {
return data_;
}
@@ -293,10 +289,6 @@ class DeferredResourceLoadingTest : public ResourceDispatcherTest,
const base::Time& completion_time) {
}
- virtual GURL GetURLForDebugging() const {
- return GURL();
- }
-
protected:
virtual void SetUp() {
EXPECT_EQ(true, shared_handle_.Create("DeferredResourceLoaderTest", false,
diff --git a/chrome/common/security_filter_peer.cc b/chrome/common/security_filter_peer.cc
index 9b0815b..6fae4d3 100644
--- a/chrome/common/security_filter_peer.cc
+++ b/chrome/common/security_filter_peer.cc
@@ -90,10 +90,6 @@ void SecurityFilterPeer::OnCompletedRequest(const URLRequestStatus& status,
NOTREACHED();
}
-GURL SecurityFilterPeer::GetURLForDebugging() const {
- return original_peer_->GetURLForDebugging();
-}
-
// static
void ProcessResponseInfo(
const webkit_glue::ResourceResponseInfo& info_in,
diff --git a/chrome/common/security_filter_peer.h b/chrome/common/security_filter_peer.h
index 8365ebd..2559bf3 100644
--- a/chrome/common/security_filter_peer.h
+++ b/chrome/common/security_filter_peer.h
@@ -44,7 +44,6 @@ class SecurityFilterPeer : public webkit_glue::ResourceLoaderBridge::Peer {
virtual void OnCompletedRequest(const URLRequestStatus& status,
const std::string& security_info,
const base::Time& completion_time);
- 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 e23b273..22b3da9 100644
--- a/chrome/plugin/chrome_plugin_host.cc
+++ b/chrome/plugin/chrome_plugin_host.cc
@@ -135,10 +135,6 @@ class PluginRequestHandlerProxy
}
}
- virtual GURL GetURLForDebugging() const {
- return GURL(cprequest_->url);
- }
-
void set_extra_headers(const std::string& headers) {
extra_headers_ = headers;
}
diff --git a/webkit/glue/media/buffered_data_source.h b/webkit/glue/media/buffered_data_source.h
index d6a7e24..dfb78d5 100644
--- a/webkit/glue/media/buffered_data_source.h
+++ b/webkit/glue/media/buffered_data_source.h
@@ -123,7 +123,6 @@ class BufferedResourceLoader :
const URLRequestStatus& status,
const std::string& security_info,
const base::Time& completion_time);
- GURL GetURLForDebugging() const { return url_; }
protected:
friend class base::RefCountedThreadSafe<BufferedResourceLoader>;
diff --git a/webkit/glue/media/buffered_data_source_unittest.cc b/webkit/glue/media/buffered_data_source_unittest.cc
index 7e6fd54..0e8d4f2 100644
--- a/webkit/glue/media/buffered_data_source_unittest.cc
+++ b/webkit/glue/media/buffered_data_source_unittest.cc
@@ -79,7 +79,6 @@ class BufferedResourceLoaderTest : public testing::Test {
loader_ = new BufferedResourceLoader(&bridge_factory_, gurl_,
first_position_, last_position_);
- EXPECT_EQ(gurl_.spec(), loader_->GetURLForDebugging().spec());
}
void SetLoaderBuffer(size_t forward_capacity, size_t backward_capacity) {
diff --git a/webkit/glue/media/simple_data_source.cc b/webkit/glue/media/simple_data_source.cc
index 256c910..d5a4c3b 100644
--- a/webkit/glue/media/simple_data_source.cc
+++ b/webkit/glue/media/simple_data_source.cc
@@ -134,9 +134,8 @@ void SimpleDataSource::OnCompletedRequest(const URLRequestStatus& status,
AutoLock auto_lock(lock_);
// It's possible this gets called after Stop(), in which case |host_| is no
// longer valid.
- if (state_ == STOPPED) {
+ if (state_ == STOPPED)
return;
- }
// Otherwise we should be initializing and have created a bridge.
DCHECK_EQ(state_, INITIALIZING);
@@ -145,18 +144,13 @@ void SimpleDataSource::OnCompletedRequest(const URLRequestStatus& status,
// If we don't get a content length or the request has failed, report it
// as a network error.
- DCHECK(size_ == -1 || static_cast<size_t>(size_) == data_.length());
- if (size_ == -1) {
+ if (size_ == -1)
size_ = data_.length();
- }
+ DCHECK(static_cast<size_t>(size_) == data_.length());
DoneInitialization_Locked(status.is_success());
}
-GURL SimpleDataSource::GetURLForDebugging() const {
- return url_;
-}
-
void SimpleDataSource::SetURL(const GURL& url) {
url_ = url;
media_format_.Clear();
diff --git a/webkit/glue/media/simple_data_source.h b/webkit/glue/media/simple_data_source.h
index 2ff851e..f264b8c 100644
--- a/webkit/glue/media/simple_data_source.h
+++ b/webkit/glue/media/simple_data_source.h
@@ -55,7 +55,6 @@ class SimpleDataSource : public media::DataSource,
virtual void OnCompletedRequest(const URLRequestStatus& status,
const std::string& security_info,
const base::Time& completion_time);
- virtual GURL GetURLForDebugging() const;
private:
// Updates |url_| and |media_format_| with the given URL.
diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h
index 2634383..52447b4 100644
--- a/webkit/glue/resource_loader_bridge.h
+++ b/webkit/glue/resource_loader_bridge.h
@@ -306,10 +306,6 @@ class ResourceLoaderBridge {
virtual void OnCompletedRequest(const URLRequestStatus& status,
const std::string& security_info,
const base::Time& completion_time) = 0;
-
- // Returns the URL of the request, which allows us to display it in
- // debugging situations.
- virtual GURL GetURLForDebugging() const = 0;
};
// use Create() for construction, but anybody can delete at any time,
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index 374f1323..77fe2a8 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-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.
@@ -293,7 +293,6 @@ class WebURLLoaderImpl::Context : public base::RefCounted<Context>,
const URLRequestStatus& status,
const std::string& security_info,
const base::Time& completion_time);
- virtual GURL GetURLForDebugging() const;
private:
friend class base::RefCounted<Context>;
@@ -658,10 +657,6 @@ void WebURLLoaderImpl::Context::OnCompletedRequest(
Release();
}
-GURL WebURLLoaderImpl::Context::GetURLForDebugging() const {
- return request_.url();
-}
-
void WebURLLoaderImpl::Context::HandleDataURL() {
ResourceResponseInfo info;
URLRequestStatus status;