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

Side by Side Diff: chrome/browser/ui/autofill/card_unmask_prompt_controller_impl.h

Issue 949323002: Collecting UMA metrics for the UnmaskPrompt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android build 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 | chrome/browser/ui/autofill/card_unmask_prompt_controller_impl.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 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 #ifndef CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h" 10 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h"
(...skipping 27 matching lines...) Expand all
38 base::string16 GetWindowTitle() const override; 38 base::string16 GetWindowTitle() const override;
39 base::string16 GetInstructionsMessage() const override; 39 base::string16 GetInstructionsMessage() const override;
40 int GetCvcImageRid() const override; 40 int GetCvcImageRid() const override;
41 bool ShouldRequestExpirationDate() const override; 41 bool ShouldRequestExpirationDate() const override;
42 bool GetStoreLocallyStartState() const override; 42 bool GetStoreLocallyStartState() const override;
43 bool InputCvcIsValid(const base::string16& input_text) const override; 43 bool InputCvcIsValid(const base::string16& input_text) const override;
44 bool InputExpirationIsValid(const base::string16& month, 44 bool InputExpirationIsValid(const base::string16& month,
45 const base::string16& year) const override; 45 const base::string16& year) const override;
46 46
47 protected: 47 protected:
48 // Virtual so tests can suppress it.
49 virtual CardUnmaskPromptView* CreateAndShowView();
50 virtual void LoadRiskFingerprint();
51
48 virtual void OnDidLoadRiskFingerprint(const std::string& risk_data); 52 virtual void OnDidLoadRiskFingerprint(const std::string& risk_data);
49 53
50 // Exposed for testing. 54 // Exposed for testing.
51 CardUnmaskPromptView* view() { return card_unmask_view_; } 55 CardUnmaskPromptView* view() { return card_unmask_view_; }
52 56
53 private: 57 private:
54 void LoadRiskFingerprint(); 58
59 bool AllowsRetry(AutofillClient::GetRealPanResult result);
60 void LogOnCloseEvents();
55 61
56 content::WebContents* web_contents_; 62 content::WebContents* web_contents_;
57 CreditCard card_; 63 CreditCard card_;
58 base::WeakPtr<CardUnmaskDelegate> delegate_; 64 base::WeakPtr<CardUnmaskDelegate> delegate_;
59 CardUnmaskPromptView* card_unmask_view_; 65 CardUnmaskPromptView* card_unmask_view_;
60 66
67 AutofillClient::GetRealPanResult unmasking_result_;
68 bool unmasking_initial_should_store_pan_;
69 int unmasking_number_of_attempts_;
70 bool unmasking_allow_retry_;
71
61 CardUnmaskDelegate::UnmaskResponse pending_response_; 72 CardUnmaskDelegate::UnmaskResponse pending_response_;
62 73
63 base::WeakPtrFactory<CardUnmaskPromptControllerImpl> weak_pointer_factory_; 74 base::WeakPtrFactory<CardUnmaskPromptControllerImpl> weak_pointer_factory_;
64 75
65 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptControllerImpl); 76 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptControllerImpl);
66 }; 77 };
67 78
68 } // namespace autofill 79 } // namespace autofill
69 80
70 #endif // CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_ 81 #endif // CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/card_unmask_prompt_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698