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

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

Issue 2717893002: Omnibox - Warm Up PSuggest on Focus (Closed)
Patch Set: revert accidentally added changes Created 3 years, 9 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // suggestions of the URL in the user's clipboard (if any) upon omnibox focus. 46 // suggestions of the URL in the user's clipboard (if any) upon omnibox focus.
47 const base::Feature kEnableClipboardProvider { 47 const base::Feature kEnableClipboardProvider {
48 "OmniboxEnableClipboardProvider", 48 "OmniboxEnableClipboardProvider",
49 #if defined(OS_IOS) 49 #if defined(OS_IOS)
50 base::FEATURE_ENABLED_BY_DEFAULT 50 base::FEATURE_ENABLED_BY_DEFAULT
51 #else 51 #else
52 base::FEATURE_DISABLED_BY_DEFAULT 52 base::FEATURE_DISABLED_BY_DEFAULT
53 #endif 53 #endif
54 }; 54 };
55 55
56 // Feature to enable the search provider to send a request to the suggest
57 // server on focus. This allows the suggest server to warm up, by, for
58 // example, loading per-user models into memory. Having a per-user model
59 // in memory allows the suggest server to respond more quickly with
60 // personalized suggestions as the user types.
61 const base::Feature kSearchProviderWarmUpOnFocus{
62 "OmniboxWarmUpSearchProviderOnFocus", base::FEATURE_DISABLED_BY_DEFAULT};
63
56 } // namespace omnibox 64 } // namespace omnibox
57 65
58 namespace { 66 namespace {
59 67
60 typedef std::map<std::string, std::string> VariationParams; 68 typedef std::map<std::string, std::string> VariationParams;
61 typedef HUPScoringParams::ScoreBuckets ScoreBuckets; 69 typedef HUPScoringParams::ScoreBuckets ScoreBuckets;
62 70
63 // Field trial names. 71 // Field trial names.
64 const char kStopTimerFieldTrialName[] = "OmniboxStopTimer"; 72 const char kStopTimerFieldTrialName[] = "OmniboxStopTimer";
65 73
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 if (it != params.end()) 775 if (it != params.end())
768 return it->second; 776 return it->second;
769 // Fall back to the global instant extended context. 777 // Fall back to the global instant extended context.
770 it = params.find(rule + ":" + page_classification_str + ":*"); 778 it = params.find(rule + ":" + page_classification_str + ":*");
771 if (it != params.end()) 779 if (it != params.end())
772 return it->second; 780 return it->second;
773 // Look up rule in the global context. 781 // Look up rule in the global context.
774 it = params.find(rule + ":*:*"); 782 it = params.find(rule + ":*:*");
775 return (it != params.end()) ? it->second : std::string(); 783 return (it != params.end()) ? it->second : std::string();
776 } 784 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698