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

Unified Diff: content/browser/web_contents/render_view_host_manager.cc

Issue 10836164: Change policy to not trigger dangerous download UI for web intents dispatched files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use the ChromeRenderViewHostTestHarness Created 8 years, 3 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/browser/download/chrome_download_manager_delegate_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/render_view_host_manager.cc
diff --git a/content/browser/web_contents/render_view_host_manager.cc b/content/browser/web_contents/render_view_host_manager.cc
index 0ad29065fcc5606cdeae2a809f75d24ef454b13c..49acb02cf4edf56476f09a91e610ae2eff1106b8 100644
--- a/content/browser/web_contents/render_view_host_manager.cc
+++ b/content/browser/web_contents/render_view_host_manager.cc
@@ -56,10 +56,11 @@ RenderViewHostManager::~RenderViewHostManager() {
if (pending_render_view_host_)
CancelPending();
- // We should always have a main RenderViewHost.
+ // We should always have a main RenderViewHost except in some tests.
RenderViewHostImpl* render_view_host = render_view_host_;
render_view_host_ = NULL;
- render_view_host->Shutdown();
+ if (render_view_host)
+ render_view_host->Shutdown();
// Shut down any swapped out RenderViewHosts.
for (RenderViewHostMap::iterator iter = swapped_out_hosts_.begin();
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698