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

Side by Side Diff: chrome/browser/prerender/prerender_manager.h

Issue 7740029: Revert 98250 - Add code to keep track of what fraction of pageviews are top sites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PRERENDER_PRERENDER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 FinalStatus final_status) const; 197 FinalStatus final_status) const;
198 198
199 const Config& config() const { return config_; } 199 const Config& config() const { return config_; }
200 Config& mutable_config() { return config_; } 200 Config& mutable_config() { return config_; }
201 201
202 PrerenderTracker* prerender_tracker() { return prerender_tracker_; } 202 PrerenderTracker* prerender_tracker() { return prerender_tracker_; }
203 203
204 // Adds a condition. This is owned by the PrerenderManager. 204 // Adds a condition. This is owned by the PrerenderManager.
205 void AddCondition(const PrerenderCondition* condition); 205 void AddCondition(const PrerenderCondition* condition);
206 206
207 bool IsTopSite(const GURL& url) const;
208
209 protected: 207 protected:
210 // Test that needs needs access to internal functions. 208 // Test that needs needs access to internal functions.
211 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ExpireTest); 209 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ExpireTest);
212 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ExtractURLInQueryStringTest); 210 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ExtractURLInQueryStringTest);
213 211
214 struct PendingContentsData; 212 struct PendingContentsData;
215 213
216 void SetPrerenderContentsFactory( 214 void SetPrerenderContentsFactory(
217 PrerenderContents::Factory* prerender_contents_factory); 215 PrerenderContents::Factory* prerender_contents_factory);
218 216
219 PendingContentsData* FindPendingEntry(const GURL& url); 217 PendingContentsData* FindPendingEntry(const GURL& url);
220 218
221 private: 219 private:
222 // Test that needs needs access to internal functions. 220 // Test that needs needs access to internal functions.
223 friend class PrerenderBrowserTest; 221 friend class PrerenderBrowserTest;
224 222
225 friend class base::RefCountedThreadSafe<PrerenderManager>; 223 friend class base::RefCountedThreadSafe<PrerenderManager>;
226 224
227 struct PrerenderContentsData; 225 struct PrerenderContentsData;
228 struct NavigationRecord; 226 struct NavigationRecord;
229 227
230 class OnCloseTabContentsDeleter; 228 class OnCloseTabContentsDeleter;
231 229
232 class MostVisitedSites;
233
234 // Adds a prerender for |url| from referrer |referrer| initiated from the 230 // Adds a prerender for |url| from referrer |referrer| initiated from the
235 // RenderViewHost specified by |child_route_id_pair|. The |origin| specifies 231 // RenderViewHost specified by |child_route_id_pair|. The |origin| specifies
236 // how the prerender was added. 232 // how the prerender was added.
237 bool AddPrerender( 233 bool AddPrerender(
238 Origin origin, 234 Origin origin,
239 const std::pair<int, int>& child_route_id_pair, 235 const std::pair<int, int>& child_route_id_pair,
240 const GURL& url, 236 const GURL& url,
241 const GURL& referrer); 237 const GURL& referrer);
242 238
243 // Adds a pending preload issued by the prerendering RenderView identified by 239 // Adds a pending preload issued by the prerendering RenderView identified by
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 ScopedRunnableMethodFactory<PrerenderManager> runnable_method_factory_; 383 ScopedRunnableMethodFactory<PrerenderManager> runnable_method_factory_;
388 384
389 ScopedVector<OnCloseTabContentsDeleter> on_close_tab_contents_deleters_; 385 ScopedVector<OnCloseTabContentsDeleter> on_close_tab_contents_deleters_;
390 386
391 scoped_ptr<PrerenderHistory> prerender_history_; 387 scoped_ptr<PrerenderHistory> prerender_history_;
392 388
393 std::list<const PrerenderCondition*> prerender_conditions_; 389 std::list<const PrerenderCondition*> prerender_conditions_;
394 390
395 scoped_ptr<PrerenderHistograms> histograms_; 391 scoped_ptr<PrerenderHistograms> histograms_;
396 392
397 scoped_ptr<MostVisitedSites> most_visited_;
398
399 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 393 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
400 }; 394 };
401 395
402 } // namespace prerender 396 } // namespace prerender
403 397
404 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 398 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698