| Index: chrome/browser/ui/webui/options2/autofill_options_handler2.cc
|
| diff --git a/chrome/browser/ui/webui/options2/autofill_options_handler2.cc b/chrome/browser/ui/webui/options2/autofill_options_handler2.cc
|
| index 8d1374e3c16aca5dc1224cb56726bf1710ebd0bb..96e14700edcdad4e049530895ceec4913a93e67a 100644
|
| --- a/chrome/browser/ui/webui/options2/autofill_options_handler2.cc
|
| +++ b/chrome/browser/ui/webui/options2/autofill_options_handler2.cc
|
| @@ -405,7 +405,7 @@ void AutofillOptionsHandler::SetCreditCardOverlayStrings(
|
| }
|
|
|
| void AutofillOptionsHandler::LoadAutofillData() {
|
| - if (!personal_data_->IsDataLoaded())
|
| + if (!IsPersonalDataLoaded())
|
| return;
|
|
|
| ListValue addresses;
|
| @@ -439,7 +439,7 @@ void AutofillOptionsHandler::LoadAutofillData() {
|
| }
|
|
|
| void AutofillOptionsHandler::RemoveAddress(const ListValue* args) {
|
| - DCHECK(personal_data_->IsDataLoaded());
|
| + DCHECK(IsPersonalDataLoaded());
|
|
|
| std::string guid;
|
| if (!args->GetString(0, &guid)) {
|
| @@ -451,7 +451,7 @@ void AutofillOptionsHandler::RemoveAddress(const ListValue* args) {
|
| }
|
|
|
| void AutofillOptionsHandler::RemoveCreditCard(const ListValue* args) {
|
| - DCHECK(personal_data_->IsDataLoaded());
|
| + DCHECK(IsPersonalDataLoaded());
|
|
|
| std::string guid;
|
| if (!args->GetString(0, &guid)) {
|
| @@ -463,7 +463,7 @@ void AutofillOptionsHandler::RemoveCreditCard(const ListValue* args) {
|
| }
|
|
|
| void AutofillOptionsHandler::LoadAddressEditor(const ListValue* args) {
|
| - DCHECK(personal_data_->IsDataLoaded());
|
| + DCHECK(IsPersonalDataLoaded());
|
|
|
| std::string guid;
|
| if (!args->GetString(0, &guid)) {
|
| @@ -502,7 +502,7 @@ void AutofillOptionsHandler::LoadAddressEditor(const ListValue* args) {
|
| }
|
|
|
| void AutofillOptionsHandler::LoadCreditCardEditor(const ListValue* args) {
|
| - DCHECK(personal_data_->IsDataLoaded());
|
| + DCHECK(IsPersonalDataLoaded());
|
|
|
| std::string guid;
|
| if (!args->GetString(0, &guid)) {
|
| @@ -537,7 +537,7 @@ void AutofillOptionsHandler::LoadCreditCardEditor(const ListValue* args) {
|
| }
|
|
|
| void AutofillOptionsHandler::SetAddress(const ListValue* args) {
|
| - if (!personal_data_->IsDataLoaded())
|
| + if (!IsPersonalDataLoaded())
|
| return;
|
|
|
| std::string guid;
|
| @@ -581,7 +581,7 @@ void AutofillOptionsHandler::SetAddress(const ListValue* args) {
|
| }
|
|
|
| void AutofillOptionsHandler::SetCreditCard(const ListValue* args) {
|
| - if (!personal_data_->IsDataLoaded())
|
| + if (!IsPersonalDataLoaded())
|
| return;
|
|
|
| std::string guid;
|
| @@ -611,7 +611,7 @@ void AutofillOptionsHandler::SetCreditCard(const ListValue* args) {
|
| }
|
|
|
| void AutofillOptionsHandler::ValidatePhoneNumbers(const ListValue* args) {
|
| - if (!personal_data_->IsDataLoaded())
|
| + if (!IsPersonalDataLoaded())
|
| return;
|
|
|
| ListValue* list_value = NULL;
|
| @@ -621,4 +621,8 @@ void AutofillOptionsHandler::ValidatePhoneNumbers(const ListValue* args) {
|
| "AutofillEditAddressOverlay.setValidatedPhoneNumbers", *list_value);
|
| }
|
|
|
| +bool AutofillOptionsHandler::IsPersonalDataLoaded() const {
|
| + return personal_data_ && personal_data_->IsDataLoaded();
|
| +}
|
| +
|
| } // namespace options2
|
|
|