OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/tab_contents/tab_autofill_manager_delegate.h" | 5 #include "chrome/browser/ui/tab_contents/tab_autofill_manager_delegate.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/infobars/infobar_tab_helper.h" | 8 #include "chrome/browser/infobars/infobar_tab_helper.h" |
9 #include "chrome/browser/password_manager/password_manager.h" | 9 #include "chrome/browser/password_manager/password_manager.h" |
10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 12 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
13 | 13 |
14 TabAutofillManagerDelegate::TabAutofillManagerDelegate(TabContents* tab) | 14 TabAutofillManagerDelegate::TabAutofillManagerDelegate(TabContents* tab) |
15 : tab_(tab) { | 15 : tab_(tab) { |
16 DCHECK(tab_); | 16 DCHECK(tab_); |
17 } | 17 } |
18 | 18 |
19 InfoBarTabService* TabAutofillManagerDelegate::GetInfoBarService() { | 19 InfoBarService* TabAutofillManagerDelegate::GetInfoBarService() { |
20 return tab_->infobar_tab_helper(); | 20 return tab_->infobar_tab_helper(); |
21 } | 21 } |
22 | 22 |
23 PrefServiceBase* TabAutofillManagerDelegate::GetPrefs() { | 23 PrefServiceBase* TabAutofillManagerDelegate::GetPrefs() { |
24 return tab_->profile()->GetPrefs(); | 24 return tab_->profile()->GetPrefs(); |
25 } | 25 } |
26 | 26 |
27 bool TabAutofillManagerDelegate::IsSavingPasswordsEnabled() const { | 27 bool TabAutofillManagerDelegate::IsSavingPasswordsEnabled() const { |
28 return tab_->password_manager()->IsSavingEnabled(); | 28 return tab_->password_manager()->IsSavingEnabled(); |
29 } | 29 } |
OLD | NEW |