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

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

Issue 18878007: Omnibox: Make the Controller Reorder Matches for Inlining (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: public consts in omnibox field trial, better spacing and wrapping in search provider Created 7 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
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/autocomplete_match.h" 5 #include "chrome/browser/autocomplete/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"
(...skipping 25 matching lines...) Expand all
36 0x2028, // Line separator 36 0x2028, // Line separator
37 0x2029, // Paragraph separator 37 0x2029, // Paragraph separator
38 0 38 0
39 }; 39 };
40 40
41 AutocompleteMatch::AutocompleteMatch() 41 AutocompleteMatch::AutocompleteMatch()
42 : provider(NULL), 42 : provider(NULL),
43 relevance(0), 43 relevance(0),
44 typed_count(-1), 44 typed_count(-1),
45 deletable(false), 45 deletable(false),
46 allowed_to_be_default_match(false),
46 transition(content::PAGE_TRANSITION_GENERATED), 47 transition(content::PAGE_TRANSITION_GENERATED),
47 is_history_what_you_typed_match(false), 48 is_history_what_you_typed_match(false),
48 type(AutocompleteMatchType::SEARCH_WHAT_YOU_TYPED), 49 type(AutocompleteMatchType::SEARCH_WHAT_YOU_TYPED),
49 starred(false), 50 starred(false),
50 from_previous(false) { 51 from_previous(false) {
51 } 52 }
52 53
53 AutocompleteMatch::AutocompleteMatch(AutocompleteProvider* provider, 54 AutocompleteMatch::AutocompleteMatch(AutocompleteProvider* provider,
54 int relevance, 55 int relevance,
55 bool deletable, 56 bool deletable,
56 Type type) 57 Type type)
57 : provider(provider), 58 : provider(provider),
58 relevance(relevance), 59 relevance(relevance),
59 typed_count(-1), 60 typed_count(-1),
60 deletable(deletable), 61 deletable(deletable),
62 allowed_to_be_default_match(false),
61 transition(content::PAGE_TRANSITION_TYPED), 63 transition(content::PAGE_TRANSITION_TYPED),
62 is_history_what_you_typed_match(false), 64 is_history_what_you_typed_match(false),
63 type(type), 65 type(type),
64 starred(false), 66 starred(false),
65 from_previous(false) { 67 from_previous(false) {
66 } 68 }
67 69
68 AutocompleteMatch::AutocompleteMatch(const AutocompleteMatch& match) 70 AutocompleteMatch::AutocompleteMatch(const AutocompleteMatch& match)
69 : provider(match.provider), 71 : provider(match.provider),
70 relevance(match.relevance), 72 relevance(match.relevance),
71 typed_count(match.typed_count), 73 typed_count(match.typed_count),
72 deletable(match.deletable), 74 deletable(match.deletable),
73 fill_into_edit(match.fill_into_edit), 75 fill_into_edit(match.fill_into_edit),
74 inline_autocompletion(match.inline_autocompletion), 76 inline_autocompletion(match.inline_autocompletion),
77 allowed_to_be_default_match(match.allowed_to_be_default_match),
75 destination_url(match.destination_url), 78 destination_url(match.destination_url),
76 stripped_destination_url(match.stripped_destination_url), 79 stripped_destination_url(match.stripped_destination_url),
77 contents(match.contents), 80 contents(match.contents),
78 contents_class(match.contents_class), 81 contents_class(match.contents_class),
79 description(match.description), 82 description(match.description),
80 description_class(match.description_class), 83 description_class(match.description_class),
81 transition(match.transition), 84 transition(match.transition),
82 is_history_what_you_typed_match(match.is_history_what_you_typed_match), 85 is_history_what_you_typed_match(match.is_history_what_you_typed_match),
83 type(match.type), 86 type(match.type),
84 associated_keyword(match.associated_keyword.get() ? 87 associated_keyword(match.associated_keyword.get() ?
(...skipping 14 matching lines...) Expand all
99 const AutocompleteMatch& match) { 102 const AutocompleteMatch& match) {
100 if (this == &match) 103 if (this == &match)
101 return *this; 104 return *this;
102 105
103 provider = match.provider; 106 provider = match.provider;
104 relevance = match.relevance; 107 relevance = match.relevance;
105 typed_count = match.typed_count; 108 typed_count = match.typed_count;
106 deletable = match.deletable; 109 deletable = match.deletable;
107 fill_into_edit = match.fill_into_edit; 110 fill_into_edit = match.fill_into_edit;
108 inline_autocompletion = match.inline_autocompletion; 111 inline_autocompletion = match.inline_autocompletion;
112 allowed_to_be_default_match = match.allowed_to_be_default_match;
109 destination_url = match.destination_url; 113 destination_url = match.destination_url;
110 stripped_destination_url = match.stripped_destination_url; 114 stripped_destination_url = match.stripped_destination_url;
111 contents = match.contents; 115 contents = match.contents;
112 contents_class = match.contents_class; 116 contents_class = match.contents_class;
113 description = match.description; 117 description = match.description;
114 description_class = match.description_class; 118 description_class = match.description_class;
115 transition = match.transition; 119 transition = match.transition;
116 is_history_what_you_typed_match = match.is_history_what_you_typed_match; 120 is_history_what_you_typed_match = match.is_history_what_you_typed_match;
117 type = match.type; 121 type = match.type;
118 associated_keyword.reset(match.associated_keyword.get() ? 122 associated_keyword.reset(match.associated_keyword.get() ?
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 << " is unsorted in relation to last offset of " << last_offset 485 << " is unsorted in relation to last offset of " << last_offset
482 << ". Provider: " << provider_name << "."; 486 << ". Provider: " << provider_name << ".";
483 DCHECK_LT(i->offset, text.length()) 487 DCHECK_LT(i->offset, text.length())
484 << " Classification of [" << i->offset << "," << text.length() 488 << " Classification of [" << i->offset << "," << text.length()
485 << "] is out of bounds for \"" << text << "\". Provider: " 489 << "] is out of bounds for \"" << text << "\". Provider: "
486 << provider_name << "."; 490 << provider_name << ".";
487 last_offset = i->offset; 491 last_offset = i->offset;
488 } 492 }
489 } 493 }
490 #endif 494 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698