OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ |
6 #define CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ | 6 #define CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // necessary. Investigate more and remove this from here. | 80 // necessary. Investigate more and remove this from here. |
81 void UpdateThemeInfo(); | 81 void UpdateThemeInfo(); |
82 | 82 |
83 // Invoked by the InstantController to update most visited items details for | 83 // Invoked by the InstantController to update most visited items details for |
84 // NTP. | 84 // NTP. |
85 void UpdateMostVisitedItemsInfo(); | 85 void UpdateMostVisitedItemsInfo(); |
86 | 86 |
87 // Sends the current set of search URLs to a renderer process. | 87 // Sends the current set of search URLs to a renderer process. |
88 void SendSearchURLsToRenderer(content::RenderProcessHost* rph); | 88 void SendSearchURLsToRenderer(content::RenderProcessHost* rph); |
89 | 89 |
| 90 // Used to validate that the URL the NTP is trying to navigate to is actually |
| 91 // a URL on the most visited items / suggested items list. |
| 92 bool IsValidURLForNavigation(const GURL& url) const; |
| 93 |
90 InstantSearchPrerenderer* instant_search_prerenderer() { | 94 InstantSearchPrerenderer* instant_search_prerenderer() { |
91 return instant_prerenderer_.get(); | 95 return instant_prerenderer_.get(); |
92 } | 96 } |
93 | 97 |
94 private: | 98 private: |
95 friend class InstantExtendedTest; | 99 friend class InstantExtendedTest; |
96 friend class InstantServiceTest; | 100 friend class InstantServiceTest; |
97 friend class InstantTestBase; | 101 friend class InstantTestBase; |
98 friend class InstantUnitTestBase; | 102 friend class InstantUnitTestBase; |
99 | 103 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // Suggestions Service to fetch server suggestions. | 184 // Suggestions Service to fetch server suggestions. |
181 suggestions::SuggestionsService* suggestions_service_; | 185 suggestions::SuggestionsService* suggestions_service_; |
182 | 186 |
183 // Used for Top Sites async retrieval. | 187 // Used for Top Sites async retrieval. |
184 base::WeakPtrFactory<InstantService> weak_ptr_factory_; | 188 base::WeakPtrFactory<InstantService> weak_ptr_factory_; |
185 | 189 |
186 DISALLOW_COPY_AND_ASSIGN(InstantService); | 190 DISALLOW_COPY_AND_ASSIGN(InstantService); |
187 }; | 191 }; |
188 | 192 |
189 #endif // CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ | 193 #endif // CHROME_BROWSER_SEARCH_INSTANT_SERVICE_H_ |
OLD | NEW |