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

Unified Diff: chrome/browser/extensions/webstore_install_with_prompt.cc

Issue 1432143002: Track where WebContents are created in order to better understand issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: chrome/browser/extensions/webstore_install_with_prompt.cc
diff --git a/chrome/browser/extensions/webstore_install_with_prompt.cc b/chrome/browser/extensions/webstore_install_with_prompt.cc
index b0ddf40c83e50028f37afeda352784af4e914cf2..846cc36da9b77f2e421dd56675965fdd7fb4688c 100644
--- a/chrome/browser/extensions/webstore_install_with_prompt.cc
+++ b/chrome/browser/extensions/webstore_install_with_prompt.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/extensions/webstore_installer.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_source.h"
using content::WebContents;
@@ -21,6 +22,8 @@ WebstoreInstallWithPrompt::WebstoreInstallWithPrompt(
dummy_web_contents_(
WebContents::Create(WebContents::CreateParams(profile))),
parent_window_(NULL) {
+ WebContentsSource::CreateForWebContentsAndLocation(dummy_web_contents_.get(),
+ FROM_HERE);
set_install_source(WebstoreInstaller::INSTALL_SOURCE_OTHER);
}
@@ -34,6 +37,8 @@ WebstoreInstallWithPrompt::WebstoreInstallWithPrompt(
dummy_web_contents_(
WebContents::Create(WebContents::CreateParams(profile))),
parent_window_(parent_window) {
+ WebContentsSource::CreateForWebContentsAndLocation(dummy_web_contents_.get(),
+ FROM_HERE);
if (parent_window_)
parent_window_tracker_ = NativeWindowTracker::Create(parent_window);
set_install_source(WebstoreInstaller::INSTALL_SOURCE_OTHER);

Powered by Google App Engine
This is Rietveld 408576698