diff options
author | Kristian Monsen <kristianm@google.com> | 2011-06-17 00:03:46 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-06-30 11:51:24 +0100 |
commit | 72348d7342b67133b80566824ec56ee7afff127f (patch) | |
tree | 8e3091bcc74ccc2c341e67c441bc1d9747baa46a /chrome | |
parent | 1677284a2f4414f9a4563d58bc955d6749c4cc2a (diff) | |
download | external_chromium-72348d7342b67133b80566824ec56ee7afff127f.zip external_chromium-72348d7342b67133b80566824ec56ee7afff127f.tar.gz external_chromium-72348d7342b67133b80566824ec56ee7afff127f.tar.bz2 |
Merge Chromium at r11.0.696.0: Fix conflicts in Autofill
Autofill renaming:
http://codereview.chromium.org/6626042
http://codereview.chromium.org/6625033
http://codereview.chromium.org/6621008
http://codereview.chromium.org/6602001
http://codereview.chromium.org/6591029
Change inside an #ifdef:
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/autofill/autofill_download.cc?view=diff&pathrev=77261&r1=77212&r2=77213
Include moved:
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/autofill/autofill_manager.h?r1=76330&r2=76512&pathrev=77261
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/autofill/autofill_manager.cc?view=diff&pathrev=77261&r1=76476&r2=76477
TabContents changed to function:
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/autofill/autofill_manager.h?r1=74360&r2=75226&pathrev=77261
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/autofill/autofill_manager.cc?view=diff&pathrev=77261&r1=75225&r2=75226
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/autofill/autofill_download.cc | 20 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_manager.cc | 72 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_manager.h | 23 |
3 files changed, 21 insertions, 94 deletions
diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc index 73e89b9..7e3e8fd 100644 --- a/chrome/browser/autofill/autofill_download.cc +++ b/chrome/browser/autofill/autofill_download.cc @@ -32,17 +32,13 @@ struct AutofillDownloadManager::FormRequestData { AutofillRequestType request_type; }; -<<<<<<< HEAD #ifdef ANDROID // Taken from autofill_manager.cc const double kAutoFillPositiveUploadRateDefaultValue = 0.01; const double kAutoFillNegativeUploadRateDefaultValue = 0.01; #endif -AutoFillDownloadManager::AutoFillDownloadManager(Profile* profile) -======= AutofillDownloadManager::AutofillDownloadManager(Profile* profile) ->>>>>>> chromium.org at r11.0.696.0 : profile_(profile), observer_(NULL), max_form_cache_size_(kMaxFormCacheSize), @@ -193,7 +189,13 @@ bool AutofillDownloadManager::StartRequest( const std::string& form_xml, const FormRequestData& request_data) { 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 Profile::GetDefaultRequestContext(); +#endif // Check if default request context is NULL: this very rarely happens, // I think, this could happen only if user opens chrome with some pages // loading the forms immediately; I cannot reproduce this even in that @@ -215,17 +217,7 @@ bool AutofillDownloadManager::StartRequest( this); url_fetchers_[fetcher] = request_data; fetcher->set_automatically_retry_on_5xx(false); -<<<<<<< HEAD -#ifdef ANDROID - // On Android, use the webview request context getter which was passed - // through in the WebAutoFill::init() method in WebKit. - fetcher->set_request_context(profile_->GetRequestContext()); -#else - fetcher->set_request_context(Profile::GetDefaultRequestContext()); -#endif -======= fetcher->set_request_context(request_context); ->>>>>>> chromium.org at r11.0.696.0 fetcher->set_upload_data("text/plain", form_xml); fetcher->Start(); return true; diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc index aa1024c..2d7e56a 100644 --- a/chrome/browser/autofill/autofill_manager.cc +++ b/chrome/browser/autofill/autofill_manager.cc @@ -24,17 +24,8 @@ #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/renderer_host/render_view_host.h" -#endif -#include "chrome/browser/tab_contents/tab_contents.h" -#ifndef ANDROID -======= ->>>>>>> chromium.org at r11.0.696.0 #include "chrome/browser/ui/browser_list.h" #include "chrome/common/autofill_messages.h" -#endif #include "chrome/common/chrome_switches.h" #include "chrome/common/guid.h" #include "chrome/common/notification_details.h" @@ -42,8 +33,10 @@ #include "chrome/common/notification_type.h" #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" +#endif #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" #include "webkit/glue/form_data.h" @@ -267,24 +260,16 @@ void AutofillManager::RegisterUserPrefs(PrefService* prefs) { } #endif -<<<<<<< HEAD #ifndef ANDROID -void AutoFillManager::DidNavigateMainFramePostCommit( -======= void AutofillManager::DidNavigateMainFramePostCommit( ->>>>>>> chromium.org at r11.0.696.0 const NavigationController::LoadCommittedDetails& details, const ViewHostMsg_FrameNavigate_Params& params) { Reset(); } #endif -<<<<<<< HEAD #ifndef ANDROID -bool AutoFillManager::OnMessageReceived(const IPC::Message& message) { -======= bool AutofillManager::OnMessageReceived(const IPC::Message& message) { ->>>>>>> chromium.org at r11.0.696.0 bool handled = true; IPC_BEGIN_MESSAGE_MAP(AutofillManager, message) IPC_MESSAGE_HANDLER(AutoFillHostMsg_FormsSeen, OnFormsSeen) @@ -308,13 +293,9 @@ 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 -======= tab_contents()->autocomplete_history_manager()->OnFormSubmitted(form); ->>>>>>> chromium.org at r11.0.696.0 +#endif if (!IsAutoFillEnabled()) return; @@ -351,15 +332,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 r11.0.696.0 +#endif int query_id, const webkit_glue::FormData& form, const webkit_glue::FormField& field) { @@ -587,12 +564,8 @@ void AutofillManager::OnFillAutoFillFormData(int query_id, #endif } -<<<<<<< HEAD -void AutoFillManager::OnShowAutoFillDialog() { -#ifndef ANDROID -======= void AutofillManager::OnShowAutoFillDialog() { ->>>>>>> chromium.org at r11.0.696.0 +#ifndef ANDROID if (!CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableTabbedOptions)) { Browser* browser = BrowserList::GetLastActive(); @@ -603,19 +576,12 @@ void AutofillManager::OnShowAutoFillDialog() { ShowAutoFillDialog(tab_contents()->GetContentNativeView(), personal_data_, -<<<<<<< HEAD - tab_contents_->profile()->GetOriginalProfile()); -#endif -} - -void AutoFillManager::OnDidFillAutoFillFormData() { -#ifndef ANDROID -======= tab_contents()->profile()->GetOriginalProfile()); +#endif } void AutofillManager::OnDidFillAutoFillFormData() { ->>>>>>> chromium.org at r11.0.696.0 +#ifndef ANDROID NotificationService::current()->Notify( NotificationType::AUTOFILL_DID_FILL_FORM_DATA, Source<RenderViewHost>(tab_contents()->render_view_host()), @@ -623,12 +589,9 @@ void AutofillManager::OnDidFillAutoFillFormData() { #endif } -<<<<<<< HEAD -void AutoFillManager::OnDidShowAutoFillSuggestions() { -#ifndef ANDROID -======= + void AutofillManager::OnDidShowAutoFillSuggestions() { ->>>>>>> chromium.org at r11.0.696.0 +#ifndef ANDROID NotificationService::current()->Notify( NotificationType::AUTOFILL_DID_SHOW_SUGGESTIONS, Source<RenderViewHost>(tab_contents()->render_view_host()), @@ -656,18 +619,13 @@ 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 = tab_contents_->profile()->GetPrefs(); -======= -bool AutofillManager::IsAutoFillEnabled() const { PrefService* prefs = const_cast<AutofillManager*>(this)->tab_contents()->profile()->GetPrefs(); ->>>>>>> chromium.org at r11.0.696.0 // Migrate obsolete AutoFill pref. if (prefs->FindPreference(prefs::kFormAutofillEnabled)) { @@ -854,15 +812,11 @@ bool AutofillManager::GetHost(const std::vector<AutoFillProfile*>& profiles, if (profiles.empty() && credit_cards.empty()) return false; -<<<<<<< HEAD #ifdef ANDROID - *host = tab_contents_->autofill_host(); + *host = tab_contents()->autofill_host(); #else - *host = tab_contents_->render_view_host(); -#endif -======= *host = tab_contents()->render_view_host(); ->>>>>>> chromium.org at r11.0.696.0 +#endif if (!*host) return false; diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h index 7594d0d..8d16fdc 100644 --- a/chrome/browser/autofill/autofill_manager.h +++ b/chrome/browser/autofill/autofill_manager.h @@ -16,13 +16,9 @@ #include "chrome/browser/autofill/autofill_dialog.h" #include "chrome/browser/autofill/autofill_download.h" #include "chrome/browser/autofill/personal_data_manager.h" -<<<<<<< HEAD #ifndef ANDROID -#include "chrome/browser/tab_contents/tab_contents_observer.h" -#endif -======= #include "content/browser/tab_contents/tab_contents_observer.h" ->>>>>>> chromium.org at r11.0.696.0 +#endif #ifndef ANDROID class AutoFillCCInfoBarDelegate; @@ -46,16 +42,11 @@ class FormField; // Manages saving and restoring the user's personal information entered into web // forms. -<<<<<<< HEAD -class AutoFillManager : +class AutofillManager : #ifndef ANDROID public TabContentsObserver, #endif - public AutoFillDownloadManager::Observer { -======= -class AutofillManager : public TabContentsObserver, public AutofillDownloadManager::Observer { ->>>>>>> chromium.org at r11.0.696.0 public: explicit AutofillManager(TabContents* tab_contents); virtual ~AutofillManager(); @@ -65,22 +56,12 @@ class AutofillManager : public TabContentsObserver, static void RegisterBrowserPrefs(PrefService* prefs); #endif -<<<<<<< HEAD #ifndef ANDROID - // Registers our Enable/Disable AutoFill pref. -======= // Registers our Enable/Disable Autofill pref. ->>>>>>> chromium.org at r11.0.696.0 static void RegisterUserPrefs(PrefService* prefs); #endif -<<<<<<< HEAD - // Returns the TabContents hosting this AutoFillManager. - TabContents* tab_contents() const { return tab_contents_; } - #ifndef ANDROID -======= ->>>>>>> chromium.org at r11.0.696.0 // TabContentsObserver implementation. virtual void DidNavigateMainFramePostCommit( const NavigationController::LoadCommittedDetails& details, |