| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/extensions/api/autofill_private/autofill_private_api.h" | 5 #include "chrome/browser/extensions/api/autofill_private/autofill_private_api.h" |
| 6 | 6 |
| 7 #include "base/guid.h" | 7 #include "base/guid.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 component->field = | 101 component->field = |
| 102 autofill_private::AddressField::ADDRESS_FIELD_ADDRESS_LINES; | 102 autofill_private::AddressField::ADDRESS_FIELD_ADDRESS_LINES; |
| 103 break; | 103 break; |
| 104 case i18n::addressinput::ORGANIZATION: | 104 case i18n::addressinput::ORGANIZATION: |
| 105 component->field = | 105 component->field = |
| 106 autofill_private::AddressField::ADDRESS_FIELD_COMPANY_NAME; | 106 autofill_private::AddressField::ADDRESS_FIELD_COMPANY_NAME; |
| 107 break; | 107 break; |
| 108 case i18n::addressinput::RECIPIENT: | 108 case i18n::addressinput::RECIPIENT: |
| 109 component->field = | 109 component->field = |
| 110 autofill_private::AddressField::ADDRESS_FIELD_FULL_NAME; | 110 autofill_private::AddressField::ADDRESS_FIELD_FULL_NAME; |
| 111 component->placeholder.reset(new std::string("Not important")); |
| 112 /* |
| 111 component->placeholder.reset(new std::string( | 113 component->placeholder.reset(new std::string( |
| 112 l10n_util::GetStringUTF8(IDS_AUTOFILL_FIELD_LABEL_ADD_NAME))); | 114 l10n_util::GetStringUTF8(IDS_AUTOFILL_FIELD_LABEL_ADD_NAME))); |
| 115 */ |
| 113 break; | 116 break; |
| 114 } | 117 } |
| 115 | 118 |
| 116 switch (components[i].length_hint) { | 119 switch (components[i].length_hint) { |
| 117 case addressinput::AddressUiComponent::HINT_LONG: | 120 case addressinput::AddressUiComponent::HINT_LONG: |
| 118 component->is_long_field = true; | 121 component->is_long_field = true; |
| 119 break; | 122 break; |
| 120 case addressinput::AddressUiComponent::HINT_SHORT: | 123 case addressinput::AddressUiComponent::HINT_SHORT: |
| 121 component->is_long_field = false; | 124 component->is_long_field = false; |
| 122 break; | 125 break; |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 error_ = kErrorDataUnavailable; | 432 error_ = kErrorDataUnavailable; |
| 430 return RespondNow(NoArguments()); | 433 return RespondNow(NoArguments()); |
| 431 } | 434 } |
| 432 | 435 |
| 433 personal_data->ResetFullServerCard(parameters->guid); | 436 personal_data->ResetFullServerCard(parameters->guid); |
| 434 | 437 |
| 435 return RespondNow(NoArguments()); | 438 return RespondNow(NoArguments()); |
| 436 } | 439 } |
| 437 | 440 |
| 438 } // namespace extensions | 441 } // namespace extensions |
| OLD | NEW |