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

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

Issue 10081023: Fix a crash when trying to input phone number in the autofill settings page while running as guest … (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
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
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
« 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