Index: chrome/browser/ui/webui/options/autofill_options_handler.cc |
diff --git a/chrome/browser/ui/webui/options/autofill_options_handler.cc b/chrome/browser/ui/webui/options/autofill_options_handler.cc |
index 667a0e243f857432b78e19e612ae1818d53d2b5b..62073ec7d9d8d45e258c727133a4199f88e81613 100644 |
--- a/chrome/browser/ui/webui/options/autofill_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/autofill_options_handler.cc |
@@ -19,6 +19,7 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/webui/web_ui_util.h" |
#include "chrome/common/guid.h" |
+#include "content/browser/tab_contents/tab_contents.h" |
#include "grit/generated_resources.h" |
#include "grit/webkit_resources.h" |
#include "ui/base/l10n/l10n_util.h" |
@@ -224,7 +225,9 @@ void AutofillOptionsHandler::GetLocalizedValues( |
} |
void AutofillOptionsHandler::Initialize() { |
- personal_data_ = web_ui_->GetProfile()->GetPersonalDataManager(); |
+ Profile* profile = |
+ Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()); |
+ personal_data_ = profile->GetPersonalDataManager(); |
personal_data_->SetObserver(this); |
LoadAutofillData(); |