Index: chrome/browser/ui/sync/one_click_signin_helper.cc |
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc |
index 2e4f90131c5015565c260ddd1d50cfe15524176e..8fb54c94cbee0b29401249fb2711819a616c98a3 100644 |
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc |
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc |
@@ -681,6 +681,9 @@ void OneClickSigninHelper::ShowInfoBarUIThread( |
// browser_test. |
OneClickSigninHelper* helper = |
OneClickSigninHelper::FromWebContents(web_contents); |
+ if (!helper) |
+ return; |
+ |
int error_message_id = 0; |
CanOfferFor can_offer_for = |
@@ -700,17 +703,15 @@ void OneClickSigninHelper::ShowInfoBarUIThread( |
// Save the email in the one-click signin manager. The manager may |
// not exist if the contents is incognito or if the profile is already |
// connected to a Google account. |
- if (helper) { |
- if (!session_index.empty()) |
- helper->session_index_ = session_index; |
+ if (!session_index.empty()) |
+ helper->session_index_ = session_index; |
- if (!email.empty()) |
- helper->email_ = email; |
+ if (!email.empty()) |
+ helper->email_ = email; |
- if (auto_accept != NO_AUTO_ACCEPT) { |
- helper->auto_accept_ = auto_accept; |
- helper->source_ = source; |
- } |
+ if (auto_accept != NO_AUTO_ACCEPT) { |
+ helper->auto_accept_ = auto_accept; |
+ helper->source_ = source; |
} |
} |