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

Unified Diff: chrome/browser/plugins/plugin_installer.cc

Issue 11029045: Fix crash when a download is requested for an outdated plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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/plugins/plugin_installer.h ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_installer.cc
diff --git a/chrome/browser/plugins/plugin_installer.cc b/chrome/browser/plugins/plugin_installer.cc
index 678addd6dba53ff6e761191cc90006961d6002e9..d109f9f7f8b1b3fb2193228a89d4a0436a8f4b12 100644
--- a/chrome/browser/plugins/plugin_installer.cc
+++ b/chrome/browser/plugins/plugin_installer.cc
@@ -37,7 +37,7 @@ using content::ResourceDispatcherHost;
namespace {
void BeginDownload(
- const GURL& url,
+ GURL url,
content::ResourceContext* resource_context,
int render_process_host_id,
int render_view_host_routing_id,
@@ -129,11 +129,9 @@ void PluginInstaller::RemoveWeakObserver(
weak_observers_.RemoveObserver(observer);
}
-void PluginInstaller::StartInstalling(bool url_for_display,
- const GURL& plugin_url,
+void PluginInstaller::StartInstalling(GURL plugin_url,
TabContents* tab_contents) {
DCHECK_EQ(INSTALLER_STATE_IDLE, state_);
- DCHECK(url_for_display);
state_ = INSTALLER_STATE_DOWNLOADING;
FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadStarted());
content::WebContents* web_contents = tab_contents->web_contents();
@@ -174,11 +172,9 @@ void PluginInstaller::DownloadStarted(
download_item->AddObserver(this);
}
-void PluginInstaller::OpenDownloadURL(bool url_for_display,
- const GURL& plugin_url,
+void PluginInstaller::OpenDownloadURL(GURL plugin_url,
ibraaaa 2012/10/05 11:14:07 Here a copy is made directly in |OpenURLParams()|
Bernhard Bauer 2012/10/05 11:16:30 Consistency with what? Note that we usually pass o
ibraaaa 2012/10/05 11:23:36 Well I thought this way. If a refactor is done to
Bernhard Bauer 2012/10/05 12:01:57 Wait, do we know that this fixes the crash? It see
content::WebContents* web_contents) {
DCHECK_EQ(INSTALLER_STATE_IDLE, state_);
- DCHECK(url_for_display);
web_contents->OpenURL(content::OpenURLParams(
plugin_url,
content::Referrer(web_contents->GetURL(),
« no previous file with comments | « chrome/browser/plugins/plugin_installer.h ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698