Index: chrome/browser/predictors/resource_prefetch_predictor.cc |
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc |
index 5f247e0151d04ad6f3cc1ed8c07f0dfe897ad7d6..ef918bd8dd2bbf79cd7deb858aea926bd495a981 100644 |
--- a/chrome/browser/predictors/resource_prefetch_predictor.cc |
+++ b/chrome/browser/predictors/resource_prefetch_predictor.cc |
@@ -326,14 +326,6 @@ void ResourcePrefetchPredictor::OnMainFrameRequest( |
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
DCHECK_EQ(INITIALIZED, initialization_state_); |
- // TODO(shishir): Remove this code after verifying that the same navigation is |
- // not seen multiple times. |
- NavigationMap::const_iterator it = |
- inflight_navigations_.find(request.navigation_id); |
- if (it != inflight_navigations_.end()) { |
- DCHECK(it->first.creation_time != request.navigation_id.creation_time); |
- } |
- |
// Cleanup older navigations. |
CleanupAbandonedNavigations(request.navigation_id); |
@@ -416,7 +408,9 @@ void ResourcePrefetchPredictor::Observe( |
const content::WebContents* web_contents = |
content::Source<content::WebContents>(source).ptr(); |
NavigationID navigation_id(*web_contents); |
- OnNavigationComplete(navigation_id); |
+ // WebContents can return an empty URL if the is no navigation entry yet. |
dominich
2012/07/31 23:08:50
nit: the -> there
Shishir
2012/07/31 23:29:35
Done.
|
+ if (!navigation_id.main_frame_url.is_empty()) |
dominich
2012/07/31 23:08:50
Also, expand the comment to explain 1) when this m
Shishir
2012/07/31 23:29:35
Its the way the GetUrl() function call in webconte
|
+ OnNavigationComplete(navigation_id); |
dominich
2012/07/31 23:08:50
When do we erase this from inflight navigations if
Shishir
2012/07/31 23:29:35
In CleanupOldNavigations.
|
break; |
} |