summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android/autofill/profile_android.cc2
-rw-r--r--android/autofill/profile_android.h18
-rw-r--r--chrome/browser/autofill/autofill_country.cc32
-rw-r--r--chrome/browser/autofill/autofill_download.cc18
-rw-r--r--chrome/browser/autofill/autofill_manager.cc119
-rw-r--r--chrome/browser/autofill/autofill_manager.h48
-rw-r--r--chrome/browser/autofill/credit_card.cc28
-rw-r--r--chrome/browser/autofill/personal_data_manager.cc49
8 files changed, 61 insertions, 253 deletions
diff --git a/android/autofill/profile_android.cc b/android/autofill/profile_android.cc
index 86f93bc..92e8ec0 100644
--- a/android/autofill/profile_android.cc
+++ b/android/autofill/profile_android.cc
@@ -67,7 +67,7 @@ PrefService* ProfileImplAndroid::GetPrefs() {
return NULL;
}
-URLRequestContextGetter* ProfileImplAndroid::GetRequestContext() {
+net::URLRequestContextGetter* ProfileImplAndroid::GetRequestContext() {
return url_request_context_getter_.get();
}
diff --git a/android/autofill/profile_android.h b/android/autofill/profile_android.h
index 0b4473d..c690735 100644
--- a/android/autofill/profile_android.h
+++ b/android/autofill/profile_android.h
@@ -33,7 +33,7 @@
#include "android/autofill/android_url_request_context_getter.h"
#include "base/basictypes.h"
#include "base/file_path.h"
-#include "base/ref_counted.h"
+#include "base/memory/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/timer.h"
#include "chrome/browser/prefs/pref_service.h"
@@ -126,14 +126,14 @@ class ProfileImplAndroid : public Profile {
public:
virtual ~ProfileImplAndroid();
- void SetRequestContext(URLRequestContextGetter* context) { url_request_context_getter_ = context; }
+ void SetRequestContext(net::URLRequestContextGetter* context) { url_request_context_getter_ = context; }
// Profile implementation.
virtual Profile* GetOriginalProfile();
virtual PersonalDataManager* GetPersonalDataManager();
virtual PrefService* GetPrefs();
virtual FilePath GetPath() { return path_; }
- virtual URLRequestContextGetter* GetRequestContext();
+ virtual net::URLRequestContextGetter* GetRequestContext();
// Functions from Profile that we don't need on Android for AutoFill.
virtual ProfileId GetRuntimeId() { NOTREACHED(); return 0; }
@@ -179,8 +179,8 @@ class ProfileImplAndroid : public Profile {
virtual const Extension* GetTheme() { NOTREACHED(); return NULL; }
virtual BrowserThemeProvider* GetThemeProvider() { NOTREACHED(); return NULL; }
virtual bool HasCreatedDownloadManager() const { NOTREACHED(); return false; }
- virtual URLRequestContextGetter* GetRequestContextForMedia() { NOTREACHED(); return NULL; }
- virtual URLRequestContextGetter* GetRequestContextForExtensions() { NOTREACHED(); return NULL; }
+ virtual net::URLRequestContextGetter* GetRequestContextForMedia() { NOTREACHED(); return NULL; }
+ virtual net::URLRequestContextGetter* GetRequestContextForExtensions() { NOTREACHED(); return NULL; }
virtual void RegisterExtensionWithRequestContexts(const Extension* extension) { NOTREACHED(); }
virtual void UnregisterExtensionWithRequestContexts(const Extension* extension) { NOTREACHED(); }
virtual net::SSLConfigService* GetSSLConfigService() { NOTREACHED(); return NULL; }
@@ -206,7 +206,7 @@ class ProfileImplAndroid : public Profile {
virtual BackgroundContentsService* GetBackgroundContentsService() const { NOTREACHED(); return NULL; }
virtual StatusTray* GetStatusTray() { NOTREACHED(); return NULL; }
virtual void MarkAsCleanShutdown() { NOTREACHED(); }
- virtual void InitExtensions() { NOTREACHED(); }
+ virtual void InitExtensions(bool extensions_enabled) { NOTREACHED(); }
virtual void InitWebResources() { NOTREACHED(); }
virtual NTPResourceCache* GetNTPResourceCache() { NOTREACHED(); return NULL; }
virtual FilePath last_selected_directory() { NOTREACHED(); return FilePath(""); }
@@ -229,6 +229,10 @@ class ProfileImplAndroid : public Profile {
virtual ChromeURLDataManager* GetChromeURLDataManager() { NOTREACHED(); return NULL; }
virtual PrefProxyConfigTracker* GetProxyConfigTracker() { NOTREACHED(); return NULL; }
virtual prerender::PrerenderManager* GetPrerenderManager() { NOTREACHED(); return NULL; }
+ virtual net::URLRequestContextGetter* GetRequestContextForPossibleApp(
+ const Extension* installed_app) { NOTREACHED(); return NULL; }
+ virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp(
+ const std::string& app_id) { NOTREACHED(); return NULL; }
private:
friend class Profile;
@@ -253,7 +257,7 @@ class ProfileImplAndroid : public Profile {
FilePath path_;
scoped_ptr<PrefService> preferences_;
scoped_refptr<PersonalDataManager> personal_data_;
- scoped_refptr<URLRequestContextGetter> url_request_context_getter_;
+ scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
DISALLOW_COPY_AND_ASSIGN(ProfileImplAndroid);
};
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 {