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

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: works now 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..f248809ab04f67dc4abb8282f50082d452edd43f 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()->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()->context()));
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()->context());
+ return profile->GetPrefs()->GetBoolean(prefs::kAutofillEnabled);
}
void AutofillManager::DeterminePossibleFieldTypesForUpload(

Powered by Google App Engine
This is Rietveld 408576698