| Index: chrome/browser/ui/prefs/prefs_tab_helper.cc
|
| diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc
|
| index 05918767ed30da816097206dcc236ec61cf1ed04..b637ab098376e65ae21ac2b25d31157723de018b 100644
|
| --- a/chrome/browser/ui/prefs/prefs_tab_helper.cc
|
| +++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc
|
| @@ -465,7 +465,7 @@ PrefsTabHelper::PrefsTabHelper(WebContents* contents)
|
| UserStyleSheetWatcher* uss =
|
| UserStyleSheetWatcherFactory::GetForProfile(GetProfile());
|
| if (uss) {
|
| - uss->RegisterOnStyleSheetUpdatedCallback(
|
| + remove_callback_ = uss->RegisterOnStyleSheetUpdatedCallback(
|
| base::Bind(&PrefsTabHelper::UpdateWebPreferences,
|
| weak_ptr_factory_.GetWeakPtr()));
|
| }
|
| @@ -483,6 +483,7 @@ PrefsTabHelper::PrefsTabHelper(WebContents* contents)
|
| }
|
|
|
| PrefsTabHelper::~PrefsTabHelper() {
|
| + remove_callback_.Run();
|
| }
|
|
|
| // static
|
|
|