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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
« no previous file with comments | « components/omnibox/autocomplete_result.cc ('k') | components/omnibox/keyword_provider.cc » ('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/omnibox/base_search_provider.h" 5 #include "components/omnibox/base_search_provider.h"
6 6
7 #include "base/i18n/case_conversion.h" 7 #include "base/i18n/case_conversion.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "components/metrics/proto/omnibox_event.pb.h" 10 #include "components/metrics/proto/omnibox_event.pb.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 append_extra_query_params; 261 append_extra_query_params;
262 // This is the destination URL sans assisted query stats. This must be set 262 // This is the destination URL sans assisted query stats. This must be set
263 // so the AutocompleteController can properly de-dupe; the controller will 263 // so the AutocompleteController can properly de-dupe; the controller will
264 // eventually overwrite it before it reaches the user. 264 // eventually overwrite it before it reaches the user.
265 match.destination_url = 265 match.destination_url =
266 GURL(search_url.ReplaceSearchTerms(*match.search_terms_args.get(), 266 GURL(search_url.ReplaceSearchTerms(*match.search_terms_args.get(),
267 search_terms_data)); 267 search_terms_data));
268 268
269 // Search results don't look like URLs. 269 // Search results don't look like URLs.
270 match.transition = suggestion.from_keyword_provider() ? 270 match.transition = suggestion.from_keyword_provider() ?
271 content::PAGE_TRANSITION_KEYWORD : content::PAGE_TRANSITION_GENERATED; 271 ui::PAGE_TRANSITION_KEYWORD : ui::PAGE_TRANSITION_GENERATED;
272 272
273 return match; 273 return match;
274 } 274 }
275 275
276 // static 276 // static
277 bool BaseSearchProvider::ZeroSuggestEnabled( 277 bool BaseSearchProvider::ZeroSuggestEnabled(
278 const GURL& suggest_url, 278 const GURL& suggest_url,
279 const TemplateURL* template_url, 279 const TemplateURL* template_url,
280 OmniboxEventProto::PageClassification page_classification, 280 OmniboxEventProto::PageClassification page_classification,
281 const SearchTermsData& search_terms_data, 281 const SearchTermsData& search_terms_data,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 } 460 }
461 461
462 void BaseSearchProvider::OnDeletionComplete( 462 void BaseSearchProvider::OnDeletionComplete(
463 bool success, SuggestionDeletionHandler* handler) { 463 bool success, SuggestionDeletionHandler* handler) {
464 RecordDeletionResult(success); 464 RecordDeletionResult(success);
465 SuggestionDeletionHandlers::iterator it = std::find( 465 SuggestionDeletionHandlers::iterator it = std::find(
466 deletion_handlers_.begin(), deletion_handlers_.end(), handler); 466 deletion_handlers_.begin(), deletion_handlers_.end(), handler);
467 DCHECK(it != deletion_handlers_.end()); 467 DCHECK(it != deletion_handlers_.end());
468 deletion_handlers_.erase(it); 468 deletion_handlers_.erase(it);
469 } 469 }
OLDNEW
« no previous file with comments | « components/omnibox/autocomplete_result.cc ('k') | components/omnibox/keyword_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698