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

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

Issue 668863002: [Clean up] Move VariationsHttpHeaderProvider into a subdirectory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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/BUILD.gn ('k') | components/suggestions/BUILD.gn » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/omnibox/search_provider.h" 5 #include "components/omnibox/search_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 11 matching lines...) Expand all
22 #include "components/metrics/proto/omnibox_input_type.pb.h" 22 #include "components/metrics/proto/omnibox_input_type.pb.h"
23 #include "components/omnibox/autocomplete_provider_client.h" 23 #include "components/omnibox/autocomplete_provider_client.h"
24 #include "components/omnibox/autocomplete_provider_listener.h" 24 #include "components/omnibox/autocomplete_provider_listener.h"
25 #include "components/omnibox/autocomplete_result.h" 25 #include "components/omnibox/autocomplete_result.h"
26 #include "components/omnibox/keyword_provider.h" 26 #include "components/omnibox/keyword_provider.h"
27 #include "components/omnibox/omnibox_field_trial.h" 27 #include "components/omnibox/omnibox_field_trial.h"
28 #include "components/omnibox/url_prefix.h" 28 #include "components/omnibox/url_prefix.h"
29 #include "components/search/search.h" 29 #include "components/search/search.h"
30 #include "components/search_engines/template_url_prepopulate_data.h" 30 #include "components/search_engines/template_url_prepopulate_data.h"
31 #include "components/search_engines/template_url_service.h" 31 #include "components/search_engines/template_url_service.h"
32 #include "components/variations/variations_http_header_provider.h" 32 #include "components/variations/net/variations_http_header_provider.h"
33 #include "grit/components_strings.h" 33 #include "grit/components_strings.h"
34 #include "net/base/escape.h" 34 #include "net/base/escape.h"
35 #include "net/base/load_flags.h" 35 #include "net/base/load_flags.h"
36 #include "net/base/net_util.h" 36 #include "net/base/net_util.h"
37 #include "net/http/http_request_headers.h" 37 #include "net/http/http_request_headers.h"
38 #include "net/url_request/url_fetcher.h" 38 #include "net/url_request/url_fetcher.h"
39 #include "net/url_request/url_request_status.h" 39 #include "net/url_request/url_request_status.h"
40 #include "ui/base/l10n/l10n_util.h" 40 #include "ui/base/l10n/l10n_util.h"
41 #include "url/url_constants.h" 41 #include "url/url_constants.h"
42 #include "url/url_util.h" 42 #include "url/url_util.h"
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 for (MatchMap::const_iterator i(map.begin()); i != map.end(); ++i) 1431 for (MatchMap::const_iterator i(map.begin()); i != map.end(); ++i)
1432 matches.push_back(i->second); 1432 matches.push_back(i->second);
1433 std::sort(matches.begin(), matches.end(), &AutocompleteMatch::MoreRelevant); 1433 std::sort(matches.begin(), matches.end(), &AutocompleteMatch::MoreRelevant);
1434 1434
1435 // If there is a top scoring entry, find the corresponding answer. 1435 // If there is a top scoring entry, find the corresponding answer.
1436 if (!matches.empty()) 1436 if (!matches.empty())
1437 return answers_cache_.GetTopAnswerEntry(matches[0].contents); 1437 return answers_cache_.GetTopAnswerEntry(matches[0].contents);
1438 1438
1439 return AnswersQueryData(); 1439 return AnswersQueryData();
1440 } 1440 }
OLDNEW
« no previous file with comments | « components/omnibox/BUILD.gn ('k') | components/suggestions/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698