Index: chrome/browser/chrome_autofill_client.cc |
diff --git a/chrome/browser/chrome_autofill_client.cc b/chrome/browser/chrome_autofill_client.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..72937bd36bd64013dbbcef0d41f6845fef16f5a4 |
--- /dev/null |
+++ b/chrome/browser/chrome_autofill_client.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/chrome_autofill_client.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" |
+ |
+ChromeAutofillClient::ChromeAutofillClient(TabContents* tab) |
+ : tab_(tab) { |
+ DCHECK(tab_); |
+} |
+ |
+InfoBarTabService* ChromeAutofillClient::GetInfoBarService() { |
+ return tab_->infobar_tab_helper(); |
+} |
+ |
+PrefServiceBase* ChromeAutofillClient::GetPrefs() { |
+ return tab_->profile()->GetPrefs(); |
+} |
+ |
+bool ChromeAutofillClient::IsSavingPasswordsEnabled() { |
+ return tab_->password_manager()->IsSavingEnabled(); |
+} |