OLD | NEW |
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 #include "chrome/browser/prerender/prerender_manager.h" | 5 #include "chrome/browser/prerender/prerender_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.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/time.h" | 10 #include "base/time.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/prerender/prerender_contents.h" | 12 #include "chrome/browser/prerender/prerender_contents.h" |
13 #include "chrome/browser/prerender/prerender_final_status.h" | 13 #include "chrome/browser/prerender/prerender_final_status.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/common/render_messages.h" | |
16 #include "content/browser/browser_thread.h" | 15 #include "content/browser/browser_thread.h" |
17 #include "content/browser/renderer_host/render_view_host.h" | 16 #include "content/browser/renderer_host/render_view_host.h" |
18 #include "content/browser/renderer_host/render_process_host.h" | 17 #include "content/browser/renderer_host/render_process_host.h" |
19 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 18 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
20 #include "content/browser/tab_contents/render_view_host_manager.h" | 19 #include "content/browser/tab_contents/render_view_host_manager.h" |
21 #include "content/browser/tab_contents/tab_contents.h" | 20 #include "content/browser/tab_contents/tab_contents.h" |
22 #include "content/common/notification_service.h" | 21 #include "content/common/notification_service.h" |
| 22 #include "content/common/view_messages.h" |
23 #include "googleurl/src/url_parse.h" | 23 #include "googleurl/src/url_parse.h" |
24 #include "googleurl/src/url_canon.h" | 24 #include "googleurl/src/url_canon.h" |
25 #include "googleurl/src/url_util.h" | 25 #include "googleurl/src/url_util.h" |
26 | 26 |
27 namespace prerender { | 27 namespace prerender { |
28 | 28 |
29 // static | 29 // static |
30 int PrerenderManager::prerenders_per_session_count_ = 0; | 30 int PrerenderManager::prerenders_per_session_count_ = 0; |
31 | 31 |
32 // static | 32 // static |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 | 584 |
585 bool PrerenderManager::IsTabContentsPrerendered(TabContents* tc) const { | 585 bool PrerenderManager::IsTabContentsPrerendered(TabContents* tc) const { |
586 return prerendered_tc_set_.count(tc) > 0; | 586 return prerendered_tc_set_.count(tc) > 0; |
587 } | 587 } |
588 | 588 |
589 bool PrerenderManager::WouldTabContentsBePrerendered(TabContents* tc) const { | 589 bool PrerenderManager::WouldTabContentsBePrerendered(TabContents* tc) const { |
590 return would_be_prerendered_tc_set_.count(tc) > 0; | 590 return would_be_prerendered_tc_set_.count(tc) > 0; |
591 } | 591 } |
592 | 592 |
593 } // namespace prerender | 593 } // namespace prerender |
OLD | NEW |