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

Unified Diff: chrome/browser/task_management/providers/web_contents/web_contents_tags_manager.cc

Issue 1185183008: New Task Manager - Phase 1.3.2.B: Implement Tab Contents Task Providing (Prerender) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using task-manager specific code in prerender_contents only if TM is enabled in build. Created 5 years, 6 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
Index: chrome/browser/task_management/providers/web_contents/web_contents_tags_manager.cc
diff --git a/chrome/browser/task_management/providers/web_contents/web_contents_tags_manager.cc b/chrome/browser/task_management/providers/web_contents/web_contents_tags_manager.cc
index b61ef1e062710103e53ef6a90147a3b1f2be47c9..d89cb1d2ef8fe894e8f712ca7f27e0cced556092 100644
--- a/chrome/browser/task_management/providers/web_contents/web_contents_tags_manager.cc
+++ b/chrome/browser/task_management/providers/web_contents/web_contents_tags_manager.cc
@@ -32,6 +32,8 @@ void WebContentsTagsManager::RemoveTag(WebContentsTag* tag) {
// We must however make sure that the provider has already forgotten about the
// tag and its associated web_contents.
+ // If this check fails, then it's an indication that the |tag|'s destructor
ncarter (slow) 2015/06/19 19:50:51 If you move the call out of the dtor (as suggested
afakhry 2015/06/19 21:49:22 Done.
+ // should have called |WebContentsTagsManager::ClearFromProvider()|.
if (provider_)
CHECK(!provider_->HasWebContents(tag->web_contents()));
}
@@ -47,6 +49,11 @@ void WebContentsTagsManager::ClearProvider() {
provider_ = nullptr;
}
+void WebContentsTagsManager::ClearFromProvider(WebContentsTag* tag) {
+ if (provider_)
+ provider_->OnWebContentsTagRemoved(tag);
+}
+
WebContentsTagsManager::WebContentsTagsManager()
: provider_(nullptr) {
}

Powered by Google App Engine
This is Rietveld 408576698