OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/autofill/chrome_autofill_client.h" | 5 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" | 9 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" |
10 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 Profile* profile = | 84 Profile* profile = |
85 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); | 85 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); |
86 return PersonalDataManagerFactory::GetForProfile( | 86 return PersonalDataManagerFactory::GetForProfile( |
87 profile->GetOriginalProfile()); | 87 profile->GetOriginalProfile()); |
88 } | 88 } |
89 | 89 |
90 scoped_refptr<AutofillWebDataService> ChromeAutofillClient::GetDatabase() { | 90 scoped_refptr<AutofillWebDataService> ChromeAutofillClient::GetDatabase() { |
91 Profile* profile = | 91 Profile* profile = |
92 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); | 92 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); |
93 return WebDataServiceFactory::GetAutofillWebDataForProfile( | 93 return WebDataServiceFactory::GetAutofillWebDataForProfile( |
94 profile, Profile::EXPLICIT_ACCESS); | 94 profile, ServiceAccessType::EXPLICIT_ACCESS); |
95 } | 95 } |
96 | 96 |
97 PrefService* ChromeAutofillClient::GetPrefs() { | 97 PrefService* ChromeAutofillClient::GetPrefs() { |
98 return Profile::FromBrowserContext(web_contents()->GetBrowserContext()) | 98 return Profile::FromBrowserContext(web_contents()->GetBrowserContext()) |
99 ->GetPrefs(); | 99 ->GetPrefs(); |
100 } | 100 } |
101 | 101 |
102 void ChromeAutofillClient::ShowAutofillSettings() { | 102 void ChromeAutofillClient::ShowAutofillSettings() { |
103 #if defined(OS_ANDROID) | 103 #if defined(OS_ANDROID) |
104 chrome::android::ChromiumApplication::ShowAutofillSettings(); | 104 chrome::android::ChromiumApplication::ShowAutofillSettings(); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 profile_full_name); | 246 profile_full_name); |
247 #endif // defined(OS_ANDROID) | 247 #endif // defined(OS_ANDROID) |
248 } | 248 } |
249 | 249 |
250 void ChromeAutofillClient::OnFirstUserGestureObserved() { | 250 void ChromeAutofillClient::OnFirstUserGestureObserved() { |
251 web_contents()->SendToAllFrames( | 251 web_contents()->SendToAllFrames( |
252 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); | 252 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); |
253 } | 253 } |
254 | 254 |
255 } // namespace autofill | 255 } // namespace autofill |
OLD | NEW |