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

Unified Diff: ui/views/controls/textfield/textfield.h

Issue 2358463002: Views::Textfield: Prevent revealing password text. (Closed)
Patch Set: Address review comments. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.h
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h
index 22ff37b869acab431c7710407f0566326106d93e..3e3b18fc6c5e5af89f5ff136545915e24631086e 100644
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -73,7 +73,8 @@ class VIEWS_EXPORT Textfield : public View,
// features. The flags is the bit map of ui::TextInputFlags.
void SetTextInputFlags(int flags);
- // Gets the text currently displayed in the Textfield.
+ // Gets the text for the Textfield. Call sites should take care to not reveal
+ // the text for a password textfield.
const base::string16& text() const { return model_->text(); }
// Sets the text currently displayed in the Textfield. This doesn't
@@ -88,7 +89,8 @@ class VIEWS_EXPORT Textfield : public View,
// Inserts |new_text| at the cursor position, replacing any selected text.
void InsertOrReplaceText(const base::string16& new_text);
- // Returns the text that is currently selected.
+ // Returns the text that is currently selected. Call sites should take care to
+ // not reveal the text for a password textfield.
base::string16 GetSelectedText() const;
// Select the entire text range. If |reversed| is true, the range will end at
@@ -386,7 +388,8 @@ class VIEWS_EXPORT Textfield : public View,
void CreateTouchSelectionControllerAndNotifyIt();
- // Updates the selection clipboard to any non-empty text selection.
+ // Updates the selection clipboard to any non-empty text selection for a non-
+ // password textfield.
void UpdateSelectionClipboard() const;
// Pastes the selection clipboard for the specified mouse event.
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698