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

Unified Diff: chrome/browser/dom_ui/tips_handler.cc

Issue 209038: Fix check for wr_list validity not covering entire use. (Closed)
Patch Set: Created 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/tips_handler.cc
diff --git a/chrome/browser/dom_ui/tips_handler.cc b/chrome/browser/dom_ui/tips_handler.cc
index be9ffbad4bff37de8e8e8d72ff48d14d0f5016bb..06f73f3e07ab48c87186d23bf41edaa8d00e8c97 100644
--- a/chrome/browser/dom_ui/tips_handler.cc
+++ b/chrome/browser/dom_ui/tips_handler.cc
@@ -54,8 +54,8 @@ void TipsHandler::HandleGetTips(const Value* content) {
if (tips_cache_->GetInteger(
WebResourceService::kCurrentTipPrefName, &current_tip_index) &&
tips_cache_->GetList(
- WebResourceService::kTipCachePrefName, &wr_list)) {
- if (wr_list && wr_list->GetSize() > 0)
+ WebResourceService::kTipCachePrefName, &wr_list) &&
+ wr_list && wr_list->GetSize() > 0) {
if (wr_list->GetSize() <= static_cast<size_t>(current_tip_index))
current_tip_index = 0;
if (wr_list->GetString(current_tip_index, &current_tip)) {
@@ -84,4 +84,3 @@ bool TipsHandler::IsValidURL(const std::wstring& url_string) {
return !url.is_empty() && (url.SchemeIs(chrome::kHttpScheme) ||
url.SchemeIs(chrome::kHttpsScheme));
}
-
« 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