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

Unified Diff: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc

Issue 10837363: Introduce AutofillClient and use it to get rid of PasswordManager dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix header Created 8 years, 4 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/ui/autofill/tab_autofill_manager_delegate.cc
diff --git a/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7dbbf86b5b53e299f6e4afbe653bfc6779243a98
--- /dev/null
+++ b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
@@ -0,0 +1,29 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h"
+
+#include "base/logging.h"
+#include "chrome/browser/infobars/infobar_tab_helper.h"
+#include "chrome/browser/password_manager/password_manager.h"
+#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
+
+TabAutofillManagerDelegate::TabAutofillManagerDelegate(TabContents* tab)
+ : tab_(tab) {
+ DCHECK(tab_);
+}
+
+InfoBarTabService* TabAutofillManagerDelegate::GetInfoBarService() {
+ return tab_->infobar_tab_helper();
+}
+
+PrefServiceBase* TabAutofillManagerDelegate::GetPrefs() {
+ return tab_->profile()->GetPrefs();
+}
+
+bool TabAutofillManagerDelegate::IsSavingPasswordsEnabled() const {
+ return tab_->password_manager()->IsSavingEnabled();
+}
« no previous file with comments | « chrome/browser/ui/autofill/tab_autofill_manager_delegate.h ('k') | chrome/browser/ui/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698