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

Side by Side Diff: components/omnibox/browser/omnibox_field_trial.cc

Issue 2738003002: Add title to current page in zero suggest. (Closed)
Patch Set: Add flag to show title for current URL suggestion. Created 3 years, 8 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
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/browser/omnibox_field_trial.h" 5 #include "components/omnibox/browser/omnibox_field_trial.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 10 matching lines...) Expand all
21 #include "components/omnibox/browser/url_index_private_data.h" 21 #include "components/omnibox/browser/url_index_private_data.h"
22 #include "components/search/search.h" 22 #include "components/search/search.h"
23 #include "components/variations/active_field_trials.h" 23 #include "components/variations/active_field_trials.h"
24 #include "components/variations/metrics_util.h" 24 #include "components/variations/metrics_util.h"
25 #include "components/variations/variations_associated_data.h" 25 #include "components/variations/variations_associated_data.h"
26 26
27 using metrics::OmniboxEventProto; 27 using metrics::OmniboxEventProto;
28 28
29 namespace omnibox { 29 namespace omnibox {
30 30
31 // Feature used for the Zero Suggest Redirect to Chrome Field Trial.
Mark P 2017/04/10 22:38:02 Copy-paste error? Please write a real comment.
gcomanici 2017/04/11 20:51:41 Done.
32 const base::Feature kIncludeTitleToACMatchForCurrentUrl{
33 "IncludeTitleToACMatchForCurrentUrl", base::FEATURE_DISABLED_BY_DEFAULT};
34 //
31 // Feature used to enable the new set of answers in suggest types (currency, 35 // Feature used to enable the new set of answers in suggest types (currency,
32 // dictionary, sports, translation, when is). Note that the state of this 36 // dictionary, sports, translation, when is). Note that the state of this
33 // Feature is not consulted anywhere in the code. It is only used to force a 37 // Feature is not consulted anywhere in the code. It is only used to force a
34 // Finch experiment arm which sends an experiment ID to GWS which triggers 38 // Finch experiment arm which sends an experiment ID to GWS which triggers
35 // serving the new types. 39 // serving the new types.
36 const base::Feature kNewOmniboxAnswerTypes{"NewOmniboxAnswerTypes", 40 const base::Feature kNewOmniboxAnswerTypes{"NewOmniboxAnswerTypes",
37 base::FEATURE_DISABLED_BY_DEFAULT}; 41 base::FEATURE_DISABLED_BY_DEFAULT};
38 42
39 // Feature used to enable the transmission of entity suggestions from GWS 43 // Feature used to enable the transmission of entity suggestions from GWS
40 // to this client. 44 // to this client.
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 if (it != params.end()) 794 if (it != params.end())
791 return it->second; 795 return it->second;
792 // Fall back to the global instant extended context. 796 // Fall back to the global instant extended context.
793 it = params.find(rule + ":" + page_classification_str + ":*"); 797 it = params.find(rule + ":" + page_classification_str + ":*");
794 if (it != params.end()) 798 if (it != params.end())
795 return it->second; 799 return it->second;
796 // Look up rule in the global context. 800 // Look up rule in the global context.
797 it = params.find(rule + ":*:*"); 801 it = params.find(rule + ":*:*");
798 return (it != params.end()) ? it->second : std::string(); 802 return (it != params.end()) ? it->second : std::string();
799 } 803 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698