| Index: chrome/browser/ui/alternate_error_tab_observer.cc
|
| diff --git a/chrome/browser/ui/alternate_error_tab_observer.cc b/chrome/browser/ui/alternate_error_tab_observer.cc
|
| index 0ad35012fa8703f1e5462cad1a8e88cdcb49477b..56ce220b3f6162568d79f4023b6078f587ae35cc 100644
|
| --- a/chrome/browser/ui/alternate_error_tab_observer.cc
|
| +++ b/chrome/browser/ui/alternate_error_tab_observer.cc
|
| @@ -16,11 +16,12 @@
|
| using content::RenderViewHost;
|
| using content::WebContents;
|
|
|
| +int AlternateErrorPageTabObserver::kUserDataKey;
|
| +
|
| AlternateErrorPageTabObserver::AlternateErrorPageTabObserver(
|
| - WebContents* web_contents,
|
| - Profile* profile)
|
| + WebContents* web_contents)
|
| : content::WebContentsObserver(web_contents),
|
| - profile_(profile) {
|
| + profile_(Profile::FromBrowserContext(web_contents->GetBrowserContext())) {
|
| PrefService* prefs = profile_->GetPrefs();
|
| if (prefs) {
|
| pref_change_registrar_.Init(prefs);
|
| @@ -51,9 +52,10 @@ void AlternateErrorPageTabObserver::RenderViewCreated(
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // content::NotificationObserver overrides
|
|
|
| -void AlternateErrorPageTabObserver::Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) {
|
| +void AlternateErrorPageTabObserver::Observe(
|
| + int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) {
|
| if (type == chrome::NOTIFICATION_PREF_CHANGED) {
|
| DCHECK_EQ(profile_->GetPrefs(), content::Source<PrefService>(source).ptr());
|
| DCHECK_EQ(std::string(prefs::kAlternateErrorPagesEnabled),
|
|
|