Index: chrome/browser/ui/webui/options/clear_browser_data_handler.cc |
diff --git a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc |
index 28b62c43479932a4b8151f293352ea15dc3f654c..5f3e8acc90f38c28cfcdcafdde280fb4c6ac63cb 100644 |
--- a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc |
+++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc |
@@ -11,6 +11,7 @@ |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/pref_names.h" |
+#include "content/browser/tab_contents/tab_contents.h" |
#include "content/common/notification_details.h" |
#include "grit/chromium_strings.h" |
#include "grit/generated_resources.h" |
@@ -90,7 +91,8 @@ void ClearBrowserDataHandler::RegisterMessages() { |
} |
void ClearBrowserDataHandler::HandleClearBrowserData(const ListValue* value) { |
- Profile* profile = web_ui_->GetProfile(); |
+ Profile* profile = |
+ Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()); |
PrefService* prefs = profile->GetPrefs(); |
int remove_mask = 0; |