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

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: 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..d3bdaa0257c7b99cc665a7b43e4ba4106810b8c6 100644
--- a/components/guest_view/browser/test_guest_view_manager.h
+++ b/components/guest_view/browser/test_guest_view_manager.h
@@ -36,11 +36,14 @@ 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 new_entry = std::make_pair(T::Type, GuestViewData(
+ create_function, base::Bind(&T::CleanUp)));
+ guest_view_registry_.insert(new_entry);
}
// Returns the number of guests that have been created since the creation of

Powered by Google App Engine
This is Rietveld 408576698