OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/content/browser/autocheckout_manager.h" | 5 #include "components/autofill/content/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/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "components/autofill/content/browser/autocheckout_request_manager.h" | 10 #include "components/autofill/content/browser/autocheckout_request_manager.h" |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 SendAutocheckoutStatus(status); | 265 SendAutocheckoutStatus(status); |
266 autofill_manager_->delegate()->OnAutocheckoutSuccess(); | 266 autofill_manager_->delegate()->OnAutocheckoutSuccess(); |
267 in_autocheckout_flow_ = false; | 267 in_autocheckout_flow_ = false; |
268 } | 268 } |
269 } | 269 } |
270 | 270 |
271 void AutocheckoutManager::OnFormsSeen() { | 271 void AutocheckoutManager::OnFormsSeen() { |
272 autocheckout_offered_ = false; | 272 autocheckout_offered_ = false; |
273 } | 273 } |
274 | 274 |
| 275 bool AutocheckoutManager::ShouldIgnoreAjax() { |
| 276 return in_autocheckout_flow_ && page_meta_data_->ignore_ajax; |
| 277 } |
| 278 |
275 void AutocheckoutManager::MaybeShowAutocheckoutBubble( | 279 void AutocheckoutManager::MaybeShowAutocheckoutBubble( |
276 const GURL& frame_url, | 280 const GURL& frame_url, |
277 const content::SSLStatus& ssl_status, | 281 const content::SSLStatus& ssl_status, |
278 const gfx::RectF& bounding_box) { | 282 const gfx::RectF& bounding_box) { |
279 if (autocheckout_offered_ || | 283 if (autocheckout_offered_ || |
280 is_autocheckout_bubble_showing_ || | 284 is_autocheckout_bubble_showing_ || |
281 !IsStartOfAutofillableFlow()) | 285 !IsStartOfAutofillableFlow()) |
282 return; | 286 return; |
283 | 287 |
284 base::Callback<void(const std::string&)> callback = base::Bind( | 288 base::Callback<void(const std::string&)> callback = base::Bind( |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 google_transaction_id_); | 482 google_transaction_id_); |
479 | 483 |
480 // Log the result of this Autocheckout flow to UMA. | 484 // Log the result of this Autocheckout flow to UMA. |
481 metric_logger_->LogAutocheckoutBuyFlowMetric( | 485 metric_logger_->LogAutocheckoutBuyFlowMetric( |
482 AutocheckoutStatusToUmaMetric(status)); | 486 AutocheckoutStatusToUmaMetric(status)); |
483 | 487 |
484 google_transaction_id_ = kTransactionIdNotSet; | 488 google_transaction_id_ = kTransactionIdNotSet; |
485 } | 489 } |
486 | 490 |
487 } // namespace autofill | 491 } // namespace autofill |
OLD | NEW |