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

Unified Diff: chrome/browser/ui/toolbar/toolbar_model_impl.cc

Issue 17022004: Replace --google-base-suggest-url and --instant-url with --google-base-url. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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: chrome/browser/ui/toolbar/toolbar_model_impl.cc
===================================================================
--- chrome/browser/ui/toolbar/toolbar_model_impl.cc (revision 208572)
+++ chrome/browser/ui/toolbar/toolbar_model_impl.cc (working copy)
@@ -266,10 +266,18 @@
DCHECK(web_contents);
const NavigationController& nav_controller = web_contents->GetController();
const NavigationEntry* entry = nav_controller.GetVisibleEntry();
+ // NOTE: If the first condition in this next statement succeeds, |entry| must
+ // be non-NULL.
if ((entry != nav_controller.GetLastCommittedEntry()) &&
(entry->GetSSL().security_style == content::SECURITY_STYLE_UNKNOWN))
return search_terms;
+ // If the URL is using a Google base URL specified via the command line, skip
+ // the security check below.
+ if (entry &&
+ google_util::StartsWithCommandLineGoogleBaseURL(entry->GetVirtualURL()))
+ return search_terms;
+
// Otherwise, extract search terms for HTTPS pages that do not have a security
// error.
ToolbarModel::SecurityLevel security_level = GetSecurityLevel();
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator_win.cc ('k') | chrome/browser/ui/toolbar/toolbar_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698