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

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

Issue 1942323002: Fix a used-after-free caused by an unremoved Observer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/profile_info_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e0ab2adbc3688ee78d597cc9ffb892f4643e3104..9159f18eb4bbb57059aba061b2e153f3f99ec81c 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/scoped_observer.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
@@ -30,7 +31,7 @@ class ProfileInfoHandler : public SettingsPageUIHandler,
static const char kProfileInfoChangedEventName[];
explicit ProfileInfoHandler(Profile* profile);
- ~ProfileInfoHandler() override {}
+ ~ProfileInfoHandler() override;
// SettingsPageUIHandler implementation.
void RegisterMessages() override;
@@ -63,6 +64,8 @@ class ProfileInfoHandler : public SettingsPageUIHandler,
// Weak pointer.
Profile* profile_;
+ ScopedObserver<ProfileAttributesStorage, ProfileInfoHandler> scoped_observer_;
tommycli 2016/05/03 17:23:48 Can we call this profile_observer_ just to be clea
anthonyvd 2016/05/03 18:12:10 Done.
+
#if defined(OS_CHROMEOS)
// Used to listen to ChromeOS user image changes.
content::NotificationRegistrar registrar_;
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/profile_info_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698