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

Side by Side Diff: components/autofill/browser/autocheckout_manager.cc

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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "components/autofill/browser/autocheckout_manager.h" 5 #include "components/autofill/browser/autocheckout_manager.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "components/autofill/browser/autocheckout_request_manager.h" 10 #include "components/autofill/browser/autocheckout_request_manager.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 SendAutocheckoutStatus(status); 248 SendAutocheckoutStatus(status);
249 autofill_manager_->delegate()->OnAutocheckoutSuccess(); 249 autofill_manager_->delegate()->OnAutocheckoutSuccess();
250 in_autocheckout_flow_ = false; 250 in_autocheckout_flow_ = false;
251 } 251 }
252 } 252 }
253 253
254 void AutocheckoutManager::OnFormsSeen() { 254 void AutocheckoutManager::OnFormsSeen() {
255 autocheckout_offered_ = false; 255 autocheckout_offered_ = false;
256 } 256 }
257 257
258 bool AutocheckoutManager::ShouldIgnoreDynamicFormChanges() {
259 return in_autocheckout_flow_ && page_meta_data_->ignore_ajax;
Ilya Sherman 2013/06/11 01:11:20 nit: Would be nice to use "DynamicFormChanges" or
Dane Wallinga 2013/06/11 19:03:32 Done.
260 }
261
258 void AutocheckoutManager::MaybeShowAutocheckoutBubble( 262 void AutocheckoutManager::MaybeShowAutocheckoutBubble(
259 const GURL& frame_url, 263 const GURL& frame_url,
260 const content::SSLStatus& ssl_status, 264 const content::SSLStatus& ssl_status,
261 const gfx::RectF& bounding_box) { 265 const gfx::RectF& bounding_box) {
262 if (autocheckout_offered_ || 266 if (autocheckout_offered_ ||
263 is_autocheckout_bubble_showing_ || 267 is_autocheckout_bubble_showing_ ||
264 !IsStartOfAutofillableFlow()) 268 !IsStartOfAutofillableFlow())
265 return; 269 return;
266 270
267 base::Callback<void(const std::string&)> callback = base::Bind( 271 base::Callback<void(const std::string&)> callback = base::Bind(
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 google_transaction_id_); 462 google_transaction_id_);
459 463
460 // Log the result of this Autocheckout flow to UMA. 464 // Log the result of this Autocheckout flow to UMA.
461 metric_logger_->LogAutocheckoutBuyFlowMetric( 465 metric_logger_->LogAutocheckoutBuyFlowMetric(
462 AutocheckoutStatusToUmaMetric(status)); 466 AutocheckoutStatusToUmaMetric(status));
463 467
464 google_transaction_id_ = kTransactionIdNotSet; 468 google_transaction_id_ = kTransactionIdNotSet;
465 } 469 }
466 470
467 } // namespace autofill 471 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698