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

Unified Diff: components/guest_view/browser/test_guest_view_manager.h

Issue 1143333008: Getting rid of more webview memory leaks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. 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: components/guest_view/browser/test_guest_view_manager.h
diff --git a/components/guest_view/browser/test_guest_view_manager.h b/components/guest_view/browser/test_guest_view_manager.h
index 2463fb69c0868969ea15a44b6fa7263d8816996e..d312d98c688f3b2bd38a71a94b322ff85067310e 100644
--- a/components/guest_view/browser/test_guest_view_manager.h
+++ b/components/guest_view/browser/test_guest_view_manager.h
@@ -36,11 +36,15 @@ class TestGuestViewManager : public GuestViewManager {
size_t GetNumRemovedInstanceIDs() const;
using GuestViewCreateFunction =
- base::Callback<GuestViewBase*(content::WebContents*)>;;
+ base::Callback<GuestViewBase*(content::WebContents*)>;
template <typename T>
- void RegisterTestGuestViewType(GuestViewCreateFunction create_function) {
- guest_view_registry_[T::Type] = create_function;
+ void RegisterTestGuestViewType(
+ const GuestViewCreateFunction& create_function) {
+ auto registry_entry = std::make_pair(
+ T::Type,
+ GuestViewData(create_function, base::Bind(&T::CleanUp)));
+ guest_view_registry_.insert(registry_entry);
}
// Returns the number of guests that have been created since the creation of
« no previous file with comments | « components/guest_view/browser/guest_view_message_filter.cc ('k') | components/guest_view/browser/test_guest_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698