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

Side by Side Diff: components/omnibox/autocomplete_match.cc

Issue 443043003: Rename components/autocomplete to components/omnibox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « components/omnibox/autocomplete_match.h ('k') | components/omnibox/autocomplete_match_type.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/autocomplete/autocomplete_match.h" 5 #include "components/omnibox/autocomplete_match.h"
6 6
7 #include "base/i18n/time_formatting.h" 7 #include "base/i18n/time_formatting.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "components/autocomplete/autocomplete_provider.h" 14 #include "components/omnibox/autocomplete_provider.h"
15 #include "components/search_engines/template_url.h" 15 #include "components/search_engines/template_url.h"
16 #include "components/search_engines/template_url_service.h" 16 #include "components/search_engines/template_url_service.h"
17 #include "grit/component_scaled_resources.h" 17 #include "grit/component_scaled_resources.h"
18 18
19 namespace { 19 namespace {
20 20
21 bool IsTrivialClassification(const ACMatchClassifications& classifications) { 21 bool IsTrivialClassification(const ACMatchClassifications& classifications) {
22 return classifications.empty() || 22 return classifications.empty() ||
23 ((classifications.size() == 1) && 23 ((classifications.size() == 1) &&
24 (classifications.back().style == ACMatchClassification::NONE)); 24 (classifications.back().style == ACMatchClassification::NONE));
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 << " is unsorted in relation to last offset of " << last_offset 534 << " is unsorted in relation to last offset of " << last_offset
535 << ". Provider: " << provider_name << "."; 535 << ". Provider: " << provider_name << ".";
536 DCHECK_LT(i->offset, text.length()) 536 DCHECK_LT(i->offset, text.length())
537 << " Classification of [" << i->offset << "," << text.length() 537 << " Classification of [" << i->offset << "," << text.length()
538 << "] is out of bounds for \"" << text << "\". Provider: " 538 << "] is out of bounds for \"" << text << "\". Provider: "
539 << provider_name << "."; 539 << provider_name << ".";
540 last_offset = i->offset; 540 last_offset = i->offset;
541 } 541 }
542 } 542 }
543 #endif 543 #endif
OLDNEW
« no previous file with comments | « components/omnibox/autocomplete_match.h ('k') | components/omnibox/autocomplete_match_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698