diff options
author | Kristian Monsen <kristianm@google.com> | 2011-07-05 21:24:01 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-07-08 18:49:51 +0100 |
commit | cfb4826edae011aed657a813297687800ed85e17 (patch) | |
tree | e1ab4eb17b5308084438d3e6b04e042b5bf66682 /chrome | |
parent | d26447072f93114b19c75ae32e18a68487125c0c (diff) | |
download | external_chromium-cfb4826edae011aed657a813297687800ed85e17.zip external_chromium-cfb4826edae011aed657a813297687800ed85e17.tar.gz external_chromium-cfb4826edae011aed657a813297687800ed85e17.tar.bz2 |
Merge Chromium at r12.0.742.93: All autofill fixes
URLRequestContextGetter moved to net and the net
namespace, http://codereview.chromium.org/6778025:
profile_android.cc
profile_android.h
autofill_download.cc
Files moved from base/ to base/memory,
http://codereview.chromium.org/6714032:
profile_android.h
New functions in profile.h:
http://src.chromium.org/viewvc/chrome/branches/742/src/chrome/browser/profiles/profile.h?view=diff&pathrev=88489&r1=78300&r2=78301
http://src.chromium.org/viewvc/chrome/branches/742/src/chrome/browser/profiles/profile.h?view=diff&pathrev=88489&r1=81769&r2=81770
profile_android.h
autofill_country.cc: Removed code where we had
local changes:
http://src.chromium.org/viewvc/chrome/branches/742/src/chrome/browser/autofill/autofill_country.cc?r1=77402&r2=77780&pathrev=88489
AutoFill -> Autofill renaming:
autofill_download.cc
autofill_manager.cc
autofill_manager.h
personal_data_manager.cc
credit_card.cc
Method with local change removed upstream, part of
the removed code added to an existing method.
http://codereview.chromium.org/6690038
autofill_manager.cc
Using TabContentsWrapper:
http://src.chromium.org/viewvc/chrome/branches/742/src/chrome/browser/autofill/autofill_manager.cc?view=diff&pathrev=88489&r1=79171&r2=79172
OnShowAutofillDialog is ifdef out by Android, so
taking upstream.
IsAutofillEnabled, Android has just ifdef return true, so taking upstream.
Change-Id: I87bfd814592aaed074d00716df355fba7be3984d
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/autofill/autofill_country.cc | 32 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_download.cc | 18 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_manager.cc | 119 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_manager.h | 48 | ||||
-rw-r--r-- | chrome/browser/autofill/credit_card.cc | 28 | ||||
-rw-r--r-- | chrome/browser/autofill/personal_data_manager.cc | 49 |
6 files changed, 49 insertions, 245 deletions
diff --git a/chrome/browser/autofill/autofill_country.cc b/chrome/browser/autofill/autofill_country.cc index 14ad292..161175a 100644 --- a/chrome/browser/autofill/autofill_country.cc +++ b/chrome/browser/autofill/autofill_country.cc @@ -19,12 +19,6 @@ #include "chrome/browser/browser_process.h" #endif #include "grit/generated_resources.h" -<<<<<<< HEAD -#ifndef ANDROID -#include "ui/base/l10n/l10n_util_collator.h" -#endif -======= ->>>>>>> chromium.org at r12.0.742.93 #include "ui/base/l10n/l10n_util.h" #include "unicode/coll.h" #include "unicode/locid.h" @@ -621,34 +615,8 @@ const std::string AutofillCountry::CountryCodeForLocale( if (CountryDataMap::Find(country_code) == CountryDataMap::End()) return "US"; -<<<<<<< HEAD - for (AutofillCountries::MapType::const_iterator it = country_data.begin(); - it != country_data.end(); - ++it) { - std::string country_code = it->first; - std::string iso3_country_code = - icu::Locale(NULL, country_code.c_str()).getISO3Country(); - - string16 name = GetDisplayName(country_code, icu_locale); - if (country == UTF8ToUTF16(iso3_country_code) -#ifndef ANDROID - // TODO(kristianm): Fix this in Android: http://b/issue?id=4959752 - || l10n_util::CompareString16WithCollator(collator.get(), - country, - name) == UCOL_EQUAL -#endif - ) { - return country_code; - } - } - - // As a fallback, try assuming the country named is localized to US English. - if (locale != "en_US") - return GetCountryCode(country, "en_US"); -======= return country_code; } ->>>>>>> chromium.org at r12.0.742.93 // static const std::string AutofillCountry::GetCountryCode(const string16& country, diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc index 9aafcc2..6130b04 100644 --- a/chrome/browser/autofill/autofill_download.cc +++ b/chrome/browser/autofill/autofill_download.cc @@ -173,12 +173,8 @@ void AutofillDownloadManager::SetPositiveUploadRate(double rate) { DCHECK(profile_); #ifndef ANDROID PrefService* preferences = profile_->GetPrefs(); -<<<<<<< HEAD - preferences->SetDouble(prefs::kAutoFillPositiveUploadRate, rate); -#endif -======= preferences->SetDouble(prefs::kAutofillPositiveUploadRate, rate); ->>>>>>> chromium.org at r12.0.742.93 +#endif } void AutofillDownloadManager::SetNegativeUploadRate(double rate) { @@ -190,27 +186,19 @@ void AutofillDownloadManager::SetNegativeUploadRate(double rate) { DCHECK(profile_); #ifndef ANDROID PrefService* preferences = profile_->GetPrefs(); -<<<<<<< HEAD - preferences->SetDouble(prefs::kAutoFillNegativeUploadRate, rate); -#endif -======= preferences->SetDouble(prefs::kAutofillNegativeUploadRate, rate); ->>>>>>> chromium.org at r12.0.742.93 +#endif } bool AutofillDownloadManager::StartRequest( const std::string& form_xml, const FormRequestData& request_data) { -<<<<<<< HEAD - URLRequestContextGetter* request_context = + net::URLRequestContextGetter* request_context = #ifdef ANDROID // On Android, use the webview request context getter which was passed // through in the WebAutoFill::init() method in WebKit. profile_->GetRequestContext(); #else -======= - net::URLRequestContextGetter* request_context = ->>>>>>> chromium.org at r12.0.742.93 Profile::GetDefaultRequestContext(); #endif // Check if default request context is NULL: this very rarely happens, diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc index 99a582e..aef58d6 100644 --- a/chrome/browser/autofill/autofill_manager.cc +++ b/chrome/browser/autofill/autofill_manager.cc @@ -18,12 +18,8 @@ #ifndef ANDROID #include "chrome/browser/autocomplete_history_manager.h" #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" -<<<<<<< HEAD #endif -#include "chrome/browser/autofill/autofill_dialog.h" -======= #include "chrome/browser/autofill/autofill_field.h" ->>>>>>> chromium.org at r12.0.742.93 #include "chrome/browser/autofill/autofill_metrics.h" #include "chrome/browser/autofill/autofill_profile.h" #include "chrome/browser/autofill/autofill_type.h" @@ -34,42 +30,27 @@ #include "chrome/browser/autofill/select_control_handler.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" -<<<<<<< HEAD #ifndef ANDROID -#include "chrome/browser/ui/browser_list.h" -#endif -#ifndef ANDROID -#include "chrome/common/autofill_messages.h" -#include "chrome/common/chrome_switches.h" -#endif -#include "chrome/common/guid.h" -#ifndef ANDROID -#include "chrome/common/notification_details.h" -#include "chrome/common/notification_service.h" -#include "chrome/common/notification_type.h" -#endif -======= #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/common/autofill_messages.h" +#endif #include "chrome/common/guid.h" ->>>>>>> chromium.org at r12.0.742.93 #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #ifndef ANDROID #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/tab_contents/tab_contents.h" -<<<<<<< HEAD -#endif -======= #include "content/common/notification_service.h" #include "content/common/notification_source.h" #include "content/common/notification_type.h" +#endif #include "googleurl/src/gurl.h" ->>>>>>> chromium.org at r12.0.742.93 #include "grit/generated_resources.h" +#ifndef ANDROID #include "ipc/ipc_message_macros.h" +#endif #include "ui/base/l10n/l10n_util.h" #include "webkit/glue/form_data.h" #ifdef ANDROID @@ -328,15 +309,11 @@ bool AutofillManager::OnMessageReceived(const IPC::Message& message) { void AutofillManager::OnFormSubmitted(const FormData& form) { // Let AutoComplete know as well. -<<<<<<< HEAD #ifndef ANDROID - tab_contents()->autocomplete_history_manager()->OnFormSubmitted(form); -#endif -======= TabContentsWrapper* wrapper = TabContentsWrapper::GetCurrentWrapperForContents(tab_contents()); wrapper->autocomplete_history_manager()->OnFormSubmitted(form); ->>>>>>> chromium.org at r12.0.742.93 +#endif if (!IsAutofillEnabled()) return; @@ -386,15 +363,11 @@ void AutofillManager::OnFormsSeen(const std::vector<FormData>& forms) { ParseForms(forms); } -<<<<<<< HEAD #ifdef ANDROID -bool AutofillManager::OnQueryFormFieldAutoFill( +bool AutofillManager::OnQueryFormFieldAutofill( #else -void AutofillManager::OnQueryFormFieldAutoFill( -#endif -======= void AutofillManager::OnQueryFormFieldAutofill( ->>>>>>> chromium.org at r12.0.742.93 +#endif int query_id, const webkit_glue::FormData& form, const webkit_glue::FormField& field) { @@ -431,12 +404,8 @@ void AutofillManager::OnQueryFormFieldAutofill( DCHECK_EQ(values.size(), unique_ids.size()); if (!values.empty()) { -<<<<<<< HEAD #ifndef ANDROID - // Don't provide AutoFill suggestions when AutoFill is disabled, and don't -======= // Don't provide Autofill suggestions when Autofill is disabled, and don't ->>>>>>> chromium.org at r12.0.742.93 // provide credit card suggestions for non-HTTPS pages. However, provide a // warning to the user in these cases. int warning = 0; @@ -502,16 +471,11 @@ void AutofillManager::OnQueryFormFieldAutofill( // Add the results from AutoComplete. They come back asynchronously, so we // hand off what we generated and they will send the results back to the // renderer. -<<<<<<< HEAD - tab_contents()->autocomplete_history_manager()->OnGetAutocompleteSuggestions( - query_id, field.name(), field.value(), values, labels, icons, unique_ids); -#endif -======= TabContentsWrapper* wrapper = TabContentsWrapper::GetCurrentWrapperForContents(tab_contents()); wrapper->autocomplete_history_manager()->OnGetAutocompleteSuggestions( query_id, field.name, field.value, values, labels, icons, unique_ids); ->>>>>>> chromium.org at r12.0.742.93 +#endif } void AutofillManager::OnFillAutofillFormData(int query_id, @@ -598,14 +562,10 @@ void AutofillManager::OnFillAutofillFormData(int query_id, } } -<<<<<<< HEAD #ifdef ANDROID host->AutoFillFormDataFilled(query_id, result); #else - host->Send(new AutoFillMsg_FormDataFilled(host->routing_id(), query_id, -======= host->Send(new AutofillMsg_FormDataFilled(host->routing_id(), query_id, ->>>>>>> chromium.org at r12.0.742.93 result)); #endif return; @@ -658,46 +618,24 @@ void AutofillManager::OnFillAutofillFormData(int query_id, } autofilled_forms_signatures_.push_front(form_structure->FormSignature()); -<<<<<<< HEAD #ifdef ANDROID host->AutoFillFormDataFilled(query_id, result); #else - host->Send(new AutoFillMsg_FormDataFilled( -======= host->Send(new AutofillMsg_FormDataFilled( ->>>>>>> chromium.org at r12.0.742.93 host->routing_id(), query_id, result)); #endif } -<<<<<<< HEAD -void AutofillManager::OnShowAutoFillDialog() { -#ifndef ANDROID - if (!CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableTabbedOptions)) { - Browser* browser = BrowserList::GetLastActive(); - if (browser) - browser->ShowOptionsTab(chrome::kAutoFillSubPage); - return; - } - - ShowAutoFillDialog(tab_contents()->GetContentNativeView(), - personal_data_, - tab_contents()->profile()->GetOriginalProfile()); -#endif -} - -void AutofillManager::OnDidFillAutoFillFormData() { -#ifndef ANDROID -======= void AutofillManager::OnShowAutofillDialog() { +#ifndef ANDROID Browser* browser = BrowserList::GetLastActive(); if (browser) browser->ShowOptionsTab(chrome::kAutofillSubPage); +#endif } void AutofillManager::OnDidFillAutofillFormData() { ->>>>>>> chromium.org at r12.0.742.93 +#ifndef ANDROID NotificationService::current()->Notify( NotificationType::AUTOFILL_DID_FILL_FORM_DATA, Source<RenderViewHost>(tab_contents()->render_view_host()), @@ -705,13 +643,8 @@ void AutofillManager::OnDidFillAutofillFormData() { #endif } -<<<<<<< HEAD - -void AutofillManager::OnDidShowAutoFillSuggestions() { -#ifndef ANDROID -======= void AutofillManager::OnDidShowAutofillSuggestions() { ->>>>>>> chromium.org at r12.0.742.93 +#ifndef ANDROID NotificationService::current()->Notify( NotificationType::AUTOFILL_DID_SHOW_SUGGESTIONS, Source<RenderViewHost>(tab_contents()->render_view_host()), @@ -739,29 +672,14 @@ void AutofillManager::OnHeuristicsRequestError( int http_error) { } -<<<<<<< HEAD -bool AutofillManager::IsAutoFillEnabled() const { +bool AutofillManager::IsAutofillEnabled() const { #ifdef ANDROID // TODO: This should be a setting in the android UI. return true; -#endif - PrefService* prefs = - const_cast<AutofillManager*>(this)->tab_contents()->profile()->GetPrefs(); - - // Migrate obsolete AutoFill pref. - if (prefs->FindPreference(prefs::kFormAutofillEnabled)) { - bool enabled = prefs->GetBoolean(prefs::kFormAutofillEnabled); - prefs->ClearPref(prefs::kFormAutofillEnabled); - prefs->SetBoolean(prefs::kAutoFillEnabled, enabled); - return enabled; - } - - return prefs->GetBoolean(prefs::kAutoFillEnabled); -======= -bool AutofillManager::IsAutofillEnabled() const { +#else return const_cast<AutofillManager*>(this)->tab_contents()->profile()-> GetPrefs()->GetBoolean(prefs::kAutofillEnabled); ->>>>>>> chromium.org at r12.0.742.93 +#endif } void AutofillManager::DeterminePossibleFieldTypesForUpload( @@ -845,17 +763,12 @@ void AutofillManager::set_metric_logger( bool AutofillManager::GetHost(const std::vector<AutofillProfile*>& profiles, const std::vector<CreditCard*>& credit_cards, -<<<<<<< HEAD #ifdef ANDROID AutoFillHost** host) { #else - RenderViewHost** host) { -#endif - if (!IsAutoFillEnabled()) -======= RenderViewHost** host) const { +#endif if (!IsAutofillEnabled()) ->>>>>>> chromium.org at r12.0.742.93 return false; // No autofill data to return if the profiles are empty. diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h index 83d59f1..1cce3b7 100644 --- a/chrome/browser/autofill/autofill_manager.h +++ b/chrome/browser/autofill/autofill_manager.h @@ -20,18 +20,13 @@ #include "chrome/browser/autofill/autofill_download.h" #include "chrome/browser/autofill/field_types.h" #include "chrome/browser/autofill/form_structure.h" +#ifndef ANDROID #include "content/browser/tab_contents/navigation_controller.h" +#endif #include "content/browser/tab_contents/tab_contents_observer.h" -<<<<<<< HEAD -#ifndef ANDROID -class AutoFillCCInfoBarDelegate; -#endif -class AutoFillProfile; -======= class AutofillField; class AutofillProfile; ->>>>>>> chromium.org at r12.0.742.93 class AutofillMetrics; class CreditCard; class PersonalDataManager; @@ -39,17 +34,15 @@ class PrefService; class RenderViewHost; class TabContents; -<<<<<<< HEAD #ifdef ANDROID class AutoFillHost; #endif -======= + struct ViewHostMsg_FrameNavigate_Params; namespace IPC { class Message; } ->>>>>>> chromium.org at r12.0.742.93 namespace webkit_glue { struct FormData; @@ -109,14 +102,14 @@ class AutofillManager : public TabContentsObserver, bool OnQueryFormFieldAutoFillWrapper(const webkit_glue::FormData& form, const webkit_glue::FormField& field) { - return OnQueryFormFieldAutoFill(0, form, field); + return OnQueryFormFieldAutofill(0, form, field); } void OnFillAutoFillFormDataWrapper(int query_id, const webkit_glue::FormData& form, const webkit_glue::FormField& field, int unique_id) { - OnFillAutoFillFormData(query_id, form, field, unique_id); + OnFillAutofillFormData(query_id, form, field, unique_id); } #endif @@ -153,23 +146,15 @@ class AutofillManager : public TabContentsObserver, private: void OnFormSubmitted(const webkit_glue::FormData& form); void OnFormsSeen(const std::vector<webkit_glue::FormData>& forms); -<<<<<<< HEAD #ifdef ANDROID - bool OnQueryFormFieldAutoFill(int query_id, - const webkit_glue::FormData& form, - const webkit_glue::FormField& field); + bool #else - void OnQueryFormFieldAutoFill(int query_id, - const webkit_glue::FormData& form, - const webkit_glue::FormField& field); + void #endif - void OnFillAutoFillFormData(int query_id, -======= - void OnQueryFormFieldAutofill(int query_id, + OnQueryFormFieldAutofill(int query_id, const webkit_glue::FormData& form, const webkit_glue::FormField& field); void OnFillAutofillFormData(int query_id, ->>>>>>> chromium.org at r12.0.742.93 const webkit_glue::FormData& form, const webkit_glue::FormField& field, int unique_id); @@ -181,15 +166,11 @@ class AutofillManager : public TabContentsObserver, // Returns false if Autofill is disabled or if the host is unavailable. bool GetHost(const std::vector<AutofillProfile*>& profiles, const std::vector<CreditCard*>& credit_cards, -<<<<<<< HEAD #ifdef ANDROID AutoFillHost** host) WARN_UNUSED_RESULT; #else - RenderViewHost** host) WARN_UNUSED_RESULT; -#endif -======= RenderViewHost** host) const WARN_UNUSED_RESULT; ->>>>>>> chromium.org at r12.0.742.93 +#endif // Fills |form_structure| cached element corresponding to |form|. // Returns false if the cached element was not found. @@ -276,19 +257,8 @@ class AutofillManager : public TabContentsObserver, // Have we logged whether Autofill is enabled for this page load? bool has_logged_autofill_enabled_; -<<<<<<< HEAD -#ifdef ANDROID - // To minimize merge conflicts, we keep this pointer around, but never use it. - void* cc_infobar_; -#else - // The InfoBar that asks for permission to store credit card information. - // Deletes itself when closed. - AutoFillCCInfoBarDelegate* cc_infobar_; -#endif -======= // Have we logged an address suggestions count metric for this page? bool has_logged_address_suggestions_count_; ->>>>>>> chromium.org at r12.0.742.93 // Our copy of the form data. ScopedVector<FormStructure> form_structures_; diff --git a/chrome/browser/autofill/credit_card.cc b/chrome/browser/autofill/credit_card.cc index 1ce31b5..b073779 100644 --- a/chrome/browser/autofill/credit_card.cc +++ b/chrome/browser/autofill/credit_card.cc @@ -283,23 +283,6 @@ const string16 CreditCard::Label() const { if (number().empty()) return name_on_card_; // No CC number, return name only. -<<<<<<< HEAD - return result; -} - -string16 CreditCard::PreviewSummary() const { -#ifdef ANDROID - // TODO: Hook up credit card support on Android. - // What is the Android UX for autofill previews? - // This has to be #if #else #endif as we can't - // compile the Chromium code that uses l10n functions. - return string16(ASCIIToUTF16("1234 5678 9123 4567")); -#else - string16 preview; - if (number().empty()) - return preview; // No CC number, means empty preview. -======= ->>>>>>> chromium.org at r12.0.742.93 string16 obfuscated_cc_number = ObfuscatedNumber(); if (!expiration_month_ || !expiration_year_) return obfuscated_cc_number; // No expiration date set. @@ -309,17 +292,11 @@ string16 CreditCard::PreviewSummary() const { formatted_date.append(ASCIIToUTF16("/")); formatted_date.append(Expiration4DigitYearAsString()); -<<<<<<< HEAD - preview = l10n_util::GetStringFUTF16( - IDS_CREDIT_CARD_NUMBER_PREVIEW_FORMAT, - obfuscated_cc_number, - formatted_date); - return preview; -#endif -======= +#ifndef ANDROID label = l10n_util::GetStringFUTF16(IDS_CREDIT_CARD_NUMBER_PREVIEW_FORMAT, obfuscated_cc_number, formatted_date); +#endif return label; } @@ -351,7 +328,6 @@ string16 CreditCard::ObfuscatedNumber() const { result.append(LastFourDigits()); return result; ->>>>>>> chromium.org at r12.0.742.93 } string16 CreditCard::LastFourDigits() const { diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc index 27388b1..3482da8 100644 --- a/chrome/browser/autofill/personal_data_manager.cc +++ b/chrome/browser/autofill/personal_data_manager.cc @@ -19,17 +19,14 @@ #include "chrome/browser/autofill/select_control_handler.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" +#ifndef ANDROID #include "chrome/browser/sync/profile_sync_service.h" +#endif #include "chrome/browser/webdata/web_data_service.h" #include "chrome/common/pref_names.h" #ifndef ANDROID #include "content/browser/browser_thread.h" -<<<<<<< HEAD #endif -#include "third_party/WebKit/Source/WebKit/chromium/public/WebRegularExpression.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" -======= ->>>>>>> chromium.org at r12.0.742.93 namespace { @@ -169,6 +166,9 @@ void PersonalDataManager::RemoveObserver( // changes. This method, |OnStateChange| acts as a deferred call to // |EmptyMigrationTrash| once the sync service becomes available. void PersonalDataManager::OnStateChanged() { +#ifdef ANDROID + return; +#else if (!profile_ || profile_->IsOffTheRecord()) return; @@ -187,21 +187,18 @@ void PersonalDataManager::OnStateChanged() { web_data_service->EmptyMigrationTrash(true); sync_service->RemoveObserver(this); } +#endif } bool PersonalDataManager::ImportFormData( const std::vector<const FormStructure*>& form_structures, const CreditCard** imported_credit_card) { -<<<<<<< HEAD #ifdef ANDROID // TODO: Is this the funcionality that tries to create a profile for the user // based on what they've entered into forms? return false; #else - scoped_ptr<AutoFillProfile> imported_profile(new AutoFillProfile); -======= - scoped_ptr<AutofillProfile> imported_profile(new AutofillProfile); ->>>>>>> chromium.org at r12.0.742.93 + scoped_ptr<AutofillProfile> imported_profile(new AutoFillProfile); scoped_ptr<CreditCard> local_imported_credit_card(new CreditCard); // Parse the form and construct a profile based on the information that is @@ -482,12 +479,8 @@ void PersonalDataManager::AddProfile(const AutofillProfile& profile) { SetProfiles(&profiles); } -<<<<<<< HEAD -void PersonalDataManager::UpdateProfile(const AutoFillProfile& profile) { -#ifndef ANDROID -======= void PersonalDataManager::UpdateProfile(const AutofillProfile& profile) { ->>>>>>> chromium.org at r12.0.742.93 +#ifndef ANDROID WebDataService* wds = profile_->GetWebDataService(Profile::EXPLICIT_ACCESS); if (!wds) return; @@ -642,12 +635,8 @@ const std::vector<AutofillProfile*>& PersonalDataManager::profiles() { bool auxiliary_profiles_enabled = false; #else bool auxiliary_profiles_enabled = profile_ ? profile_->GetPrefs()->GetBoolean( -<<<<<<< HEAD - prefs::kAutoFillAuxiliaryProfilesEnabled) : false; -#endif -======= prefs::kAutofillAuxiliaryProfilesEnabled) : false; ->>>>>>> chromium.org at r12.0.742.93 +#endif if (!auxiliary_profiles_enabled) return web_profiles(); @@ -697,7 +686,11 @@ void PersonalDataManager::Init(Profile* profile) { } bool PersonalDataManager::IsAutofillEnabled() const { +#ifdef ANDROID + return true; +#else return profile_->GetPrefs()->GetBoolean(prefs::kAutofillEnabled); +#endif } // static @@ -798,12 +791,8 @@ void PersonalDataManager::LoadProfiles() { CancelPendingQuery(&pending_profiles_query_); -<<<<<<< HEAD - pending_profiles_query_ = web_data_service->GetAutoFillProfiles(this); -#endif -======= pending_profiles_query_ = web_data_service->GetAutofillProfiles(this); ->>>>>>> chromium.org at r12.0.742.93 +#endif } // Win and Linux implementations do nothing. Mac implementation fills in the @@ -883,15 +872,11 @@ void PersonalDataManager::CancelPendingQuery(WebDataService::Handle* handle) { } void PersonalDataManager::SaveImportedProfile( -<<<<<<< HEAD - const AutoFillProfile& imported_profile) { + const AutofillProfile& imported_profile) { #ifdef ANDROID // TODO: This should update the profile in Java land. return; #else -======= - const AutofillProfile& imported_profile) { ->>>>>>> chromium.org at r12.0.742.93 if (profile_->IsOffTheRecord()) return; @@ -939,6 +924,9 @@ void PersonalDataManager::SaveImportedCreditCard( } void PersonalDataManager::EmptyMigrationTrash() { +#ifdef ANDROID + return; +#else if (!profile_ || profile_->IsOffTheRecord()) return; @@ -963,6 +951,7 @@ void PersonalDataManager::EmptyMigrationTrash() { if (!sync_service->HasObserver(this)) sync_service->AddObserver(this); } +#endif } void PersonalDataManager::LogProfileCount() const { |