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

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

Issue 2488743002: Remove legal messages from save card bubble before offering local save. (Closed)
Patch Set: Fix test crash Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698