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

Unified Diff: chrome/browser/ui/webui/settings/profile_info_handler.h

Issue 2629083002: MD Settings: fix crash from strongly bound handler that goes away (Closed)
Patch Set: Created 3 years, 11 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/ui/webui/settings/profile_info_handler.h
diff --git a/chrome/browser/ui/webui/settings/profile_info_handler.h b/chrome/browser/ui/webui/settings/profile_info_handler.h
index 6aa21f0e8b99773e1b0e6c3dc7356c548f70f9cb..5050e5b3adee00e00c01cd3e8ea0c6f6134d742a 100644
--- a/chrome/browser/ui/webui/settings/profile_info_handler.h
+++ b/chrome/browser/ui/webui/settings/profile_info_handler.h
@@ -8,6 +8,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "base/scoped_observer.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
@@ -95,6 +96,8 @@ class ProfileInfoHandler : public SettingsPageUIHandler,
// Used to listen for changes in the list of managed supervised users.
PrefChangeRegistrar profile_pref_registrar_;
+ base::WeakPtrFactory<ProfileInfoHandler> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileInfoHandler);
};

Powered by Google App Engine
This is Rietveld 408576698