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

Unified Diff: chrome/browser/autofill/autofill_manager.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: browser_context Created 9 years, 5 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
Index: chrome/browser/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index b9d133e257f5a1b733d2d9f868fb457caf3ae5c7..97d42e71fbf68c3f4f733477d669f12dcce9e7ca 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -415,7 +415,7 @@ void AutofillManager::OnFormSubmitted(const FormData& form) {
if (!IsAutofillEnabled())
return;
- if (tab_contents()->profile()->IsOffTheRecord())
+ if (tab_contents()->browser_context()->IsOffTheRecord())
return;
// Don't save data that was submitted through JavaScript.
@@ -696,7 +696,7 @@ void AutofillManager::OnFillAutofillFormData(int query_id,
void AutofillManager::OnShowAutofillDialog() {
Browser* browser = BrowserList::GetLastActiveWithProfile(
- tab_contents()->profile());
+ static_cast<Profile*>(tab_contents()->browser_context()));
Ilya Sherman 2011/07/21 22:29:23 I really don't like that clients need to magically
if (browser)
browser->ShowOptionsTab(chrome::kAutofillSubPage);
}
@@ -745,8 +745,9 @@ void AutofillManager::OnServerRequestError(
}
bool AutofillManager::IsAutofillEnabled() const {
- return const_cast<AutofillManager*>(this)->tab_contents()->profile()->
- GetPrefs()->GetBoolean(prefs::kAutofillEnabled);
+ Profile* profile = static_cast<Profile*>(
+ const_cast<AutofillManager*>(this)->tab_contents()->browser_context());
+ return profile->GetPrefs()->GetBoolean(prefs::kAutofillEnabled);
Ilya Sherman 2011/07/21 22:29:23 Similar question here: Are all clients of GetPrefs
}
void AutofillManager::DeterminePossibleFieldTypesForUpload(

Powered by Google App Engine
This is Rietveld 408576698