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

Unified Diff: chrome/browser/autocomplete/autocomplete_match.cc

Issue 10537154: A working implementation of AQS (Assisted Query Stats). (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed comments and added more docs. Created 8 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/autocomplete/autocomplete_match.cc
diff --git a/chrome/browser/autocomplete/autocomplete_match.cc b/chrome/browser/autocomplete/autocomplete_match.cc
index e5e2cd3ee8fb13a4ed26870ad665471188c60ebe..c16405ba08d8209f015c745b1ac33688bcba6b87 100644
--- a/chrome/browser/autocomplete/autocomplete_match.cc
+++ b/chrome/browser/autocomplete/autocomplete_match.cc
@@ -68,11 +68,14 @@ AutocompleteMatch::AutocompleteMatch(const AutocompleteMatch& match)
transition(match.transition),
is_history_what_you_typed_match(match.is_history_what_you_typed_match),
type(match.type),
+ associated_keyword(match.associated_keyword.get() ?
+ new AutocompleteMatch(*match.associated_keyword) : NULL),
keyword(match.keyword),
starred(match.starred),
- from_previous(match.from_previous) {
- if (match.associated_keyword.get())
- associated_keyword.reset(new AutocompleteMatch(*match.associated_keyword));
+ from_previous(match.from_previous),
+ search_terms_args(match.search_terms_args.get() ?
+ new TemplateURLRef::SearchTermsArgs(*match.search_terms_args) :
+ NULL) {
}
AutocompleteMatch::~AutocompleteMatch() {
@@ -103,7 +106,8 @@ AutocompleteMatch& AutocompleteMatch::operator=(
keyword = match.keyword;
starred = match.starred;
from_previous = match.from_previous;
-
+ search_terms_args.reset(match.search_terms_args.get() ?
+ new TemplateURLRef::SearchTermsArgs(*match.search_terms_args) : NULL);
return *this;
}
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_match.h ('k') | chrome/browser/autocomplete/autocomplete_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698