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

Unified Diff: ui/views/controls/progress_bar.cc

Issue 11155002: views: Fix progress bar tooltip text function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittest Created 8 years, 2 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
Index: ui/views/controls/progress_bar.cc
diff --git a/ui/views/controls/progress_bar.cc b/ui/views/controls/progress_bar.cc
index 0b93a1fc3f9552a1393efd040bef4353305f1eac..4b1c74a1909d168ae78977a4072534b43f29b4af 100644
--- a/ui/views/controls/progress_bar.cc
+++ b/ui/views/controls/progress_bar.cc
@@ -168,11 +168,11 @@ void ProgressBar::SetTooltipText(const string16& tooltip_text) {
}
bool ProgressBar::GetTooltipText(const gfx::Point& p, string16* tooltip) const {
- DCHECK(tooltip);
Peter Kasting 2012/10/15 19:03:10 Why remove this?
- if (tooltip == NULL)
+ if (tooltip_text_.empty())
Peter Kasting 2012/10/15 19:03:10 This is a behavior change: the old code still assi
tfarina 2012/10/15 19:15:49 The impact would be minimal, ProgressBar control i
Peter Kasting 2012/10/15 19:19:54 As long as the callers work fine with the behavior
return false;
- tooltip->assign(tooltip_text_);
- return !tooltip_text_.empty();
+
+ *tooltip = tooltip_text_;
+ return true;
}
void ProgressBar::GetAccessibleState(ui::AccessibleViewState* state) {
« no previous file with comments | « no previous file | ui/views/controls/progress_bar_unittest.cc » ('j') | ui/views/controls/progress_bar_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698