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

Side by Side Diff: chrome/browser/search/search.cc

Issue 2143953002: Remove search::ShouldPrefetchSearchResultsOnSRP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO Created 4 years, 4 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 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 "chrome/browser/search/search.h" 5 #include "chrome/browser/search/search.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #endif 45 #endif
46 46
47 #if defined(OS_CHROMEOS) 47 #if defined(OS_CHROMEOS)
48 #include "chrome/browser/chromeos/login/signin/merge_session_throttling_utils.h" 48 #include "chrome/browser/chromeos/login/signin/merge_session_throttling_utils.h"
49 #endif // defined(OS_CHROMEOS) 49 #endif // defined(OS_CHROMEOS)
50 50
51 namespace search { 51 namespace search {
52 52
53 namespace { 53 namespace {
54 54
55 const char kPrefetchSearchResultsOnSRP[] = "prefetch_results_srp";
56 const char kPrerenderInstantUrlOnOmniboxFocus[] = 55 const char kPrerenderInstantUrlOnOmniboxFocus[] =
57 "prerender_instant_url_on_omnibox_focus"; 56 "prerender_instant_url_on_omnibox_focus";
58 57
59 // Controls whether to use the alternate Instant search base URL. This allows 58 // Controls whether to use the alternate Instant search base URL. This allows
60 // experimentation of Instant search. 59 // experimentation of Instant search.
61 const char kUseAltInstantURL[] = "use_alternate_instant_url"; 60 const char kUseAltInstantURL[] = "use_alternate_instant_url";
62 const char kUseSearchPathForInstant[] = "use_search_path_for_instant"; 61 const char kUseSearchPathForInstant[] = "use_search_path_for_instant";
63 const char kAltInstantURLPath[] = "search"; 62 const char kAltInstantURLPath[] = "search";
64 const char kAltInstantURLQueryParams[] = "&qbp=1"; 63 const char kAltInstantURLQueryParams[] = "&qbp=1";
65 64
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 603
605 InstantSupportState GetInstantSupportStateFromNavigationEntry( 604 InstantSupportState GetInstantSupportStateFromNavigationEntry(
606 const content::NavigationEntry& entry) { 605 const content::NavigationEntry& entry) {
607 base::string16 value; 606 base::string16 value;
608 if (!entry.GetExtraData(kInstantSupportStateKey, &value)) 607 if (!entry.GetExtraData(kInstantSupportStateKey, &value))
609 return INSTANT_SUPPORT_UNKNOWN; 608 return INSTANT_SUPPORT_UNKNOWN;
610 609
611 return StringToInstantSupportState(value); 610 return StringToInstantSupportState(value);
612 } 611 }
613 612
614 bool ShouldPrefetchSearchResultsOnSRP() {
615 FieldTrialFlags flags;
616 return GetFieldTrialInfo(&flags) && GetBoolValueForFlagWithDefault(
617 kPrefetchSearchResultsOnSRP, false, flags);
618 }
619
620 bool ShouldUseAltInstantURL() { 613 bool ShouldUseAltInstantURL() {
621 FieldTrialFlags flags; 614 FieldTrialFlags flags;
622 return GetFieldTrialInfo(&flags) && GetBoolValueForFlagWithDefault( 615 return GetFieldTrialInfo(&flags) && GetBoolValueForFlagWithDefault(
623 kUseAltInstantURL, false, flags); 616 kUseAltInstantURL, false, flags);
624 } 617 }
625 618
626 bool ShouldUseSearchPathForInstant() { 619 bool ShouldUseSearchPathForInstant() {
627 FieldTrialFlags flags; 620 FieldTrialFlags flags;
628 return GetFieldTrialInfo(&flags) && GetBoolValueForFlagWithDefault( 621 return GetFieldTrialInfo(&flags) && GetBoolValueForFlagWithDefault(
629 kUseSearchPathForInstant, false, flags); 622 kUseSearchPathForInstant, false, flags);
630 } 623 }
631 624
632 } // namespace search 625 } // namespace search
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698