| Index: chrome/browser/ui/webui/options2/autofill_options_handler2.cc
|
| ===================================================================
|
| --- chrome/browser/ui/webui/options2/autofill_options_handler2.cc (revision 132519)
|
| +++ chrome/browser/ui/webui/options2/autofill_options_handler2.cc (working copy)
|
| @@ -405,7 +405,7 @@
|
| }
|
|
|
| void AutofillOptionsHandler::LoadAutofillData() {
|
| - if (!personal_data_->IsDataLoaded())
|
| + if (!IsPersonalDataLoaded())
|
| return;
|
|
|
| ListValue addresses;
|
| @@ -439,7 +439,7 @@
|
| }
|
|
|
| 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::RemoveCreditCard(const ListValue* args) {
|
| - DCHECK(personal_data_->IsDataLoaded());
|
| + DCHECK(IsPersonalDataLoaded());
|
|
|
| std::string guid;
|
| if (!args->GetString(0, &guid)) {
|
| @@ -463,7 +463,7 @@
|
| }
|
|
|
| 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::LoadCreditCardEditor(const ListValue* args) {
|
| - DCHECK(personal_data_->IsDataLoaded());
|
| + DCHECK(IsPersonalDataLoaded());
|
|
|
| std::string guid;
|
| if (!args->GetString(0, &guid)) {
|
| @@ -537,7 +537,7 @@
|
| }
|
|
|
| void AutofillOptionsHandler::SetAddress(const ListValue* args) {
|
| - if (!personal_data_->IsDataLoaded())
|
| + if (!IsPersonalDataLoaded())
|
| return;
|
|
|
| std::string guid;
|
| @@ -581,7 +581,7 @@
|
| }
|
|
|
| void AutofillOptionsHandler::SetCreditCard(const ListValue* args) {
|
| - if (!personal_data_->IsDataLoaded())
|
| + if (!IsPersonalDataLoaded())
|
| return;
|
|
|
| std::string guid;
|
| @@ -611,7 +611,7 @@
|
| }
|
|
|
| void AutofillOptionsHandler::ValidatePhoneNumbers(const ListValue* args) {
|
| - if (!personal_data_->IsDataLoaded())
|
| + if (!IsPersonalDataLoaded())
|
| return;
|
|
|
| ListValue* list_value = NULL;
|
| @@ -621,4 +621,8 @@
|
| "AutofillEditAddressOverlay.setValidatedPhoneNumbers", *list_value);
|
| }
|
|
|
| +bool AutofillOptionsHandler::IsPersonalDataLoaded() const {
|
| + return personal_data_ && personal_data_->IsDataLoaded();
|
| +}
|
| +
|
| } // namespace options2
|
|
|