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

Unified Diff: chrome/browser/ui/tabs/tab_strip_model.cc

Issue 23835007: DevTools: Do not close devtools if there are dirty files in workspace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revisiting naming & comments Created 7 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/ui/tabs/tab_strip_model.cc
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index 91042c7a0a60a40aaed18397615fa5422c8fd6fb..a6c2c7a36b570823cb5b03f2856dd54068c10a16 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -1202,6 +1202,8 @@ bool TabStripModel::InternalCloseTabs(const std::vector<int>& indices,
std::map<content::RenderProcessHost*, size_t> processes;
for (size_t i = 0; i < indices.size(); ++i) {
WebContents* closing_contents = GetWebContentsAtImpl(indices[i]);
+ if (delegate_->ShouldRunUnloadListenerBeforeClosing(closing_contents))
+ continue;
content::RenderProcessHost* process =
closing_contents->GetRenderProcessHost();
++processes[process];

Powered by Google App Engine
This is Rietveld 408576698