| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/autocomplete/zero_suggest_provider.h" | 5 #include "chrome/browser/autocomplete/zero_suggest_provider.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/i18n/case_conversion.h" | 8 #include "base/i18n/case_conversion.h" |
| 9 #include "base/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 // variations can be shown. | 378 // variations can be shown. |
| 379 if (!OmniboxFieldTrial::InZeroSuggestMostVisitedFieldTrial() && | 379 if (!OmniboxFieldTrial::InZeroSuggestMostVisitedFieldTrial() && |
| 380 !OmniboxFieldTrial::InZeroSuggestPersonalizedFieldTrial()) | 380 !OmniboxFieldTrial::InZeroSuggestPersonalizedFieldTrial()) |
| 381 return false; | 381 return false; |
| 382 | 382 |
| 383 // Only show zero suggest for HTTP[S] pages. | 383 // Only show zero suggest for HTTP[S] pages. |
| 384 // TODO(mariakhomenko): We may be able to expand this set to include pages | 384 // TODO(mariakhomenko): We may be able to expand this set to include pages |
| 385 // with other schemes (e.g. chrome://). That may require improvements to | 385 // with other schemes (e.g. chrome://). That may require improvements to |
| 386 // the formatting of the verbatim result returned by MatchForCurrentURL(). | 386 // the formatting of the verbatim result returned by MatchForCurrentURL(). |
| 387 if (!current_page_url.is_valid() || | 387 if (!current_page_url.is_valid() || |
| 388 ((current_page_url.scheme() != content::kHttpScheme) && | 388 ((current_page_url.scheme() != url::kHttpScheme) && |
| 389 (current_page_url.scheme() != content::kHttpsScheme))) | 389 (current_page_url.scheme() != url::kHttpsScheme))) |
| 390 return false; | 390 return false; |
| 391 | 391 |
| 392 return true; | 392 return true; |
| 393 } | 393 } |
| OLD | NEW |