| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/save_card_bubble_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/save_card_bubble_controller_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "chrome/browser/ui/autofill/save_card_bubble_view.h" | 9 #include "chrome/browser/ui/autofill/save_card_bubble_view.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 SaveCardBubbleControllerImpl::~SaveCardBubbleControllerImpl() { | 40 SaveCardBubbleControllerImpl::~SaveCardBubbleControllerImpl() { |
| 41 if (save_card_bubble_view_) | 41 if (save_card_bubble_view_) |
| 42 save_card_bubble_view_->Hide(); | 42 save_card_bubble_view_->Hide(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void SaveCardBubbleControllerImpl::ShowBubbleForLocalSave( | 45 void SaveCardBubbleControllerImpl::ShowBubbleForLocalSave( |
| 46 const CreditCard& card, | 46 const CreditCard& card, |
| 47 const base::Closure& save_card_callback) { | 47 const base::Closure& save_card_callback) { |
| 48 is_uploading_ = false; | 48 is_uploading_ = false; |
| 49 is_reshow_ = false; | 49 is_reshow_ = false; |
| 50 legal_message_lines_.clear(); |
| 51 |
| 50 AutofillMetrics::LogSaveCardPromptMetric( | 52 AutofillMetrics::LogSaveCardPromptMetric( |
| 51 AutofillMetrics::SAVE_CARD_PROMPT_SHOW_REQUESTED, is_uploading_, | 53 AutofillMetrics::SAVE_CARD_PROMPT_SHOW_REQUESTED, is_uploading_, |
| 52 is_reshow_); | 54 is_reshow_); |
| 53 | 55 |
| 54 card_ = card; | 56 card_ = card; |
| 55 save_card_callback_ = save_card_callback; | 57 save_card_callback_ = save_card_callback; |
| 56 ShowBubble(); | 58 ShowBubble(); |
| 57 } | 59 } |
| 58 | 60 |
| 59 void SaveCardBubbleControllerImpl::ShowBubbleForUpload( | 61 void SaveCardBubbleControllerImpl::ShowBubbleForUpload( |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 location_bar->UpdateSaveCreditCardIcon(); | 226 location_bar->UpdateSaveCreditCardIcon(); |
| 225 } | 227 } |
| 226 | 228 |
| 227 void SaveCardBubbleControllerImpl::OpenUrl(const GURL& url) { | 229 void SaveCardBubbleControllerImpl::OpenUrl(const GURL& url) { |
| 228 web_contents()->OpenURL(content::OpenURLParams( | 230 web_contents()->OpenURL(content::OpenURLParams( |
| 229 url, content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, | 231 url, content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| 230 ui::PAGE_TRANSITION_LINK, false)); | 232 ui::PAGE_TRANSITION_LINK, false)); |
| 231 } | 233 } |
| 232 | 234 |
| 233 } // namespace autofill | 235 } // namespace autofill |
| OLD | NEW |