OLD | NEW |
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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 // Extended mode instant requires a search terms replacement key. | 733 // Extended mode instant requires a search terms replacement key. |
734 return instant_url.is_valid() && | 734 return instant_url.is_valid() && |
735 (!IsInstantExtendedAPIEnabled() || | 735 (!IsInstantExtendedAPIEnabled() || |
736 template_url->HasSearchTermsReplacementKey(instant_url)); | 736 template_url->HasSearchTermsReplacementKey(instant_url)); |
737 } | 737 } |
738 | 738 |
739 void ResetInstantExtendedOptInStateGateForTest() { | 739 void ResetInstantExtendedOptInStateGateForTest() { |
740 instant_extended_opt_in_state_gate = false; | 740 instant_extended_opt_in_state_gate = false; |
741 } | 741 } |
742 | 742 |
743 bool AreMostVisitedItemsEqual( | |
744 const std::vector<InstantMostVisitedItem>& items_a, | |
745 const std::vector<InstantMostVisitedItem>& items_b) { | |
746 if (items_a.size() != items_b.size()) | |
747 return false; | |
748 | |
749 for (size_t i = 0; i < items_b.size(); ++i) { | |
750 if (items_b[i].url != items_a[i].url || | |
751 items_b[i].title != items_a[i].title) { | |
752 return false; | |
753 } | |
754 } | |
755 return true; | |
756 } | |
757 | |
758 } // namespace chrome | 743 } // namespace chrome |
OLD | NEW |