Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: chrome/browser/ui/webui/options2/autofill_options_handler2.cc

Issue 10108008: Merge 132511 - Fix a crash when trying to input phone number in the autofill settings page while ru… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/options2/autofill_options_handler2.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/ui/webui/options2/autofill_options_handler2.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698