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

Side by Side Diff: chrome/browser/autocomplete/zero_suggest_provider.cc

Issue 254763005: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve a merge conflict. Created 6 years, 7 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider.cc ('k') | chrome/browser/browsing_data/browsing_data_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698