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

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

Issue 990463002: [autofill] Query credit card scanning feature once per browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/credit_card_scanner_controller.h" 5 #include "chrome/browser/ui/autofill/credit_card_scanner_controller.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // The time when the UI was shown. 66 // The time when the UI was shown.
67 base::TimeTicks show_time_; 67 base::TimeTicks show_time_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(Controller); 69 DISALLOW_COPY_AND_ASSIGN(Controller);
70 }; 70 };
71 71
72 } // namespace 72 } // namespace
73 73
74 // static 74 // static
75 bool CreditCardScannerController::HasCreditCardScanFeature() { 75 bool CreditCardScannerController::HasCreditCardScanFeature() {
76 return CreditCardScannerView::CanShow(); 76 static const bool kCanShow = CreditCardScannerView::CanShow();
77 return kCanShow;
77 } 78 }
78 79
79 // static 80 // static
80 void CreditCardScannerController::ScanCreditCard( 81 void CreditCardScannerController::ScanCreditCard(
81 content::WebContents* web_contents, 82 content::WebContents* web_contents,
82 const AutofillClient::CreditCardScanCallback& callback) { 83 const AutofillClient::CreditCardScanCallback& callback) {
83 (new Controller(web_contents, callback))->Show(); 84 (new Controller(web_contents, callback))->Show();
84 } 85 }
85 86
86 } // namespace autofill 87 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698