Index: chrome/browser/task_management/web_contents_tags.cc |
diff --git a/chrome/browser/task_management/web_contents_tags.cc b/chrome/browser/task_management/web_contents_tags.cc |
index 72adce102c83a93e14b75775f06e336198bc5fbe..eb261c20da3e940f1ef893cf7e88670dec3105ae 100644 |
--- a/chrome/browser/task_management/web_contents_tags.cc |
+++ b/chrome/browser/task_management/web_contents_tags.cc |
@@ -6,6 +6,7 @@ |
#include "chrome/browser/task_management/providers/web_contents/background_contents_tag.h" |
#include "chrome/browser/task_management/providers/web_contents/devtools_tag.h" |
+#include "chrome/browser/task_management/providers/web_contents/prerender_tag.h" |
#include "chrome/browser/task_management/providers/web_contents/web_contents_tags_manager.h" |
#include "content/public/browser/web_contents.h" |
@@ -50,5 +51,23 @@ void WebContentsTags::CreateForDevToolsContents( |
} |
} |
+// static |
+void WebContentsTags::CreateForPrerenderContents( |
+ content::WebContents* web_contents) { |
+ if (!WebContentsTag::FromWebContents(web_contents)) { |
+ TagWebContents(web_contents, |
+ new PrerenderTag(web_contents), |
+ WebContentsTag::kTagKey); |
+ } |
+} |
+ |
+// static |
+void WebContentsTags::ClearTag(content::WebContents* web_contents) { |
+ DCHECK(web_contents); |
gavinp
2015/06/22 18:38:04
Nit: I don't think this DCHECK is needed. Won't th
afakhry
2015/06/22 21:56:18
Done.
|
+ const WebContentsTag* tag = WebContentsTag::FromWebContents(web_contents); |
+ WebContentsTagsManager::GetInstance()->ClearFromProvider(tag); |
+ web_contents->RemoveUserData(WebContentsTag::kTagKey); |
+} |
+ |
} // namespace task_management |