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

Side by Side Diff: chrome/browser/search/instant_service.h

Issue 1669723002: NTP: don't allow navigateContentWindow to navigate where it pleases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better comments Created 4 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/search/instant_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/search/instant_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698