summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 00:40:32 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 00:40:32 +0000
commit816cb613e0210984e25fc997803acc8876e5adbe (patch)
treea2fa14168e2779c35ed063a5baa8b7608b9616c7 /chrome/browser/net
parentfa8e9bb118618affecc379bda67db1b2f86f8fa8 (diff)
downloadchromium_src-816cb613e0210984e25fc997803acc8876e5adbe.zip
chromium_src-816cb613e0210984e25fc997803acc8876e5adbe.tar.gz
chromium_src-816cb613e0210984e25fc997803acc8876e5adbe.tar.bz2
Revert 18520.
The original code review for this change was: <http://codereview.chromium.org/125171> It is being reverted because it seems to have caused a valgrind on linux regression: <http://crbug.com14218> BUG=14218,14138,14188 Review URL: http://codereview.chromium.org/126248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18574 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/dns_global.cc26
1 files changed, 5 insertions, 21 deletions
diff --git a/chrome/browser/net/dns_global.cc b/chrome/browser/net/dns_global.cc
index 9e4c8f6..cf7145c 100644
--- a/chrome/browser/net/dns_global.cc
+++ b/chrome/browser/net/dns_global.cc
@@ -149,9 +149,6 @@ class PrefetchObserver : public net::HostResolver::Observer {
int request_id,
bool was_resolved,
const net::HostResolver::RequestInfo& request_info);
- virtual void OnCancelResolution(
- int request_id,
- const net::HostResolver::RequestInfo& request_info);
static void DnsGetFirstResolutionsHtml(std::string* output);
static void SaveStartupListAsPref(PrefService* local_state);
@@ -205,9 +202,12 @@ void PrefetchObserver::OnStartResolution(
NavigatingTo(request_info.hostname());
+ // TODO(eroman): If the resolve request is cancelled, then
+ // OnFinishResolutionWithStatus will not be called, and |resolutions| will
+ // grow unbounded!
+ // http://crbug.com/14138
+
AutoLock auto_lock(*lock);
- // This entry will be deleted either by OnFinishResolutionWithStatus(), or
- // by OnCancelResolution().
(*resolutions)[request_id] = navigation_info;
}
@@ -240,22 +240,6 @@ void PrefetchObserver::OnFinishResolutionWithStatus(
StartupListAppend(navigation_info);
}
-void PrefetchObserver::OnCancelResolution(
- int request_id,
- const net::HostResolver::RequestInfo& request_info) {
- if (request_info.is_speculative())
- return; // One of our own requests.
-
- // Remove the entry from |resolutions| that was added by OnStartResolution().
- AutoLock auto_lock(*lock);
- ObservedResolutionMap::iterator it = resolutions->find(request_id);
- if (resolutions->end() == it) {
- DCHECK(false);
- return;
- }
- resolutions->erase(it);
-}
-
// static
void PrefetchObserver::StartupListAppend(const DnsHostInfo& navigation_info) {
if (!on_the_record_switch || NULL == dns_master)