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

Side by Side Diff: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc

Issue 13947035: Fail autocheckout if there is no forms in the page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move logic to ParseForms Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | components/autofill/browser/autofill_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" 5 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/autofill/autocheckout_whitelist_manager_factory.h" 9 #include "chrome/browser/autofill/autocheckout_whitelist_manager_factory.h"
10 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" 10 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 sync_state_changed_callback_ = callback; 91 sync_state_changed_callback_ = callback;
92 92
93 // Invariant: Either sync_state_changed_callback_.is_null() is true 93 // Invariant: Either sync_state_changed_callback_.is_null() is true
94 // and this object is not subscribed as a 94 // and this object is not subscribed as a
95 // ProfileSyncServiceObserver, or 95 // ProfileSyncServiceObserver, or
96 // sync_state_changed_callback_.is_null() is false and this object 96 // sync_state_changed_callback_.is_null() is false and this object
97 // is subscribed as a ProfileSyncServiceObserver. 97 // is subscribed as a ProfileSyncServiceObserver.
98 } 98 }
99 99
100 void TabAutofillManagerDelegate::OnAutocheckoutError() { 100 void TabAutofillManagerDelegate::OnAutocheckoutError() {
101 dialog_controller_->OnAutocheckoutError(); 101 if (dialog_controller_)
ahutter 2013/04/10 22:38:06 I still don't think this change should be here.
benquan 2013/04/11 02:17:56 replaced the null check with a comment
102 dialog_controller_->OnAutocheckoutError();
102 } 103 }
103 104
104 void TabAutofillManagerDelegate::ShowAutofillSettings() { 105 void TabAutofillManagerDelegate::ShowAutofillSettings() {
105 #if defined(OS_ANDROID) 106 #if defined(OS_ANDROID)
106 NOTIMPLEMENTED(); 107 NOTIMPLEMENTED();
107 #else 108 #else
108 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); 109 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_);
109 if (browser) 110 if (browser)
110 chrome::ShowSettingsSubPage(browser, chrome::kAutofillSubPage); 111 chrome::ShowSettingsSubPage(browser, chrome::kAutofillSubPage);
111 #endif // #if defined(OS_ANDROID) 112 #endif // #if defined(OS_ANDROID)
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 (dialog_controller_->dialog_type() == 220 (dialog_controller_->dialog_type() ==
220 autofill::DIALOG_TYPE_REQUEST_AUTOCOMPLETE || 221 autofill::DIALOG_TYPE_REQUEST_AUTOCOMPLETE ||
221 !dialog_controller_->AutocheckoutIsRunning())) { 222 !dialog_controller_->AutocheckoutIsRunning())) {
222 HideRequestAutocompleteDialog(); 223 HideRequestAutocompleteDialog();
223 } 224 }
224 225
225 HideAutocheckoutBubble(); 226 HideAutocheckoutBubble();
226 } 227 }
227 228
228 } // namespace autofill 229 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/browser/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698