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

Unified Diff: components/autofill/browser/autocheckout_manager.h

Issue 16611003: Ignore ajax on specified pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unittests Created 7 years, 6 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
Index: components/autofill/browser/autocheckout_manager.h
diff --git a/components/autofill/browser/autocheckout_manager.h b/components/autofill/browser/autocheckout_manager.h
index 4c996f25077cb3a31a620793418040409e3c9f4e..93164fc970a8fa7d7dbf42e60925b756416e0d3f 100644
--- a/components/autofill/browser/autocheckout_manager.h
+++ b/components/autofill/browser/autocheckout_manager.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/callback_forward.h"
+#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/string16.h"
@@ -61,6 +62,10 @@ class AutocheckoutManager {
// Called when a page containing forms is loaded.
void OnFormsSeen();
+ // Whether dynamic form changes on the current page should be ignored during
+ // an Autocheckout flow.
+ bool ShouldIgnoreDynamicFormChanges();
+
// Causes the Autocheckout bubble to be displayed if the user hasn't seen it
// yet for the current page. |frame_url| is the page where Autocheckout is
// being initiated. |ssl_status| is the SSL status of the page. |bounding_box|
@@ -80,6 +85,11 @@ class AutocheckoutManager {
// Exposed for testing.
bool autocheckout_offered() const { return autocheckout_offered_; }
+ // Exposed for testing.
+ void set_in_autocheckout_flow(bool in_autocheckout_flow) {
+ in_autocheckout_flow_ = in_autocheckout_flow;
Ilya Sherman 2013/06/11 01:11:20 nit: Reduce indentation by two spaces.
Dane Wallinga 2013/06/11 19:03:32 Done.
+ }
+
// Show the requestAutocomplete dialog if |show_dialog| is true. Also, does
// bookkeeping for whether or not the bubble is showing.
virtual void MaybeShowAutocheckoutDialog(const GURL& frame_url,
@@ -152,6 +162,9 @@ class AutocheckoutManager {
base::ThreadChecker thread_checker_;
+ friend class AutofillManagerTest;
+ FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DynamicFormsSeenAndIgnored);
Ilya Sherman 2013/06/11 01:11:20 Why are these needed? Almost always, you should p
Dane Wallinga 2013/06/11 19:03:32 *shrug* - this is the pattern we appear to be usin
Ilya Sherman 2013/06/11 23:14:32 Alright, let me be clearer: Please do not friend t
Dane Wallinga 2013/06/12 20:33:37 Ok, so AutofillManager has a member AutocheckoutMa
Ilya Sherman 2013/06/15 01:18:19 Looking more closely at the test code, IMO the bes
+
DISALLOW_COPY_AND_ASSIGN(AutocheckoutManager);
};

Powered by Google App Engine
This is Rietveld 408576698