Chromium Code Reviews| 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 722 // Extended mode instant requires a search terms replacement key. | 722 // Extended mode instant requires a search terms replacement key. |
| 723 return instant_url.is_valid() && | 723 return instant_url.is_valid() && |
| 724 (!IsInstantExtendedAPIEnabled() || | 724 (!IsInstantExtendedAPIEnabled() || |
| 725 template_url->HasSearchTermsReplacementKey(instant_url)); | 725 template_url->HasSearchTermsReplacementKey(instant_url)); |
| 726 } | 726 } |
| 727 | 727 |
| 728 void ResetInstantExtendedOptInStateGateForTest() { | 728 void ResetInstantExtendedOptInStateGateForTest() { |
| 729 instant_extended_opt_in_state_gate = false; | 729 instant_extended_opt_in_state_gate = false; |
| 730 } | 730 } |
| 731 | 731 |
| 732 bool AreMostVisitedItemsEqual( | |
| 733 const std::vector<InstantMostVisitedItem>& items_a, | |
| 734 const std::vector<InstantMostVisitedItem>& items_b) { | |
| 735 if (items_a.size() != items_b.size()) | |
| 736 return false; | |
| 737 | |
| 738 for (size_t i = 0; i < items_b.size(); ++i) { | |
| 739 if (items_b[i].url != items_a[i].url || | |
| 740 items_b[i].title != items_a[i].title) | |
|
palmer
2013/06/05 17:50:54
Nit: Might need curly braces here, too.
I could b
kmadhusu
2013/06/05 18:40:39
Done.
| |
| 741 return false; | |
| 742 } | |
| 743 return true; | |
| 744 } | |
| 745 | |
| 732 } // namespace chrome | 746 } // namespace chrome |
| OLD | NEW |