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

Unified Diff: chrome/browser/search/search.cc

Issue 265743003: Change a DCHECK to CHECK in chrome::ExtractSearchTermsFromURL(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index b1934df12235525a8029aa0c5ecee9999f95bb14..1c10dfa81b6f74321082fafb6422203168ccf0ce 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -408,8 +408,7 @@ base::string16 ExtractSearchTermsFromURL(Profile* profile, const GURL& url) {
// page.
Peter Kasting 2014/05/01 20:21:02 Nit: Add an explanation of when this can be NULL (
InstantSearchPrerenderer* prerenderer =
InstantSearchPrerenderer::GetForProfile(profile);
- DCHECK(prerenderer);
- return prerenderer->get_last_query();
+ return prerenderer ? prerenderer->get_last_query() : base::string16();
}
TemplateURL* template_url = GetDefaultSearchProviderTemplateURL(profile);
« 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