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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "content/browser/cancelable_request.h" | 36 #include "content/browser/cancelable_request.h" |
37 #include "content/browser/debugger/render_view_devtools_agent_host.h" | 37 #include "content/browser/debugger/render_view_devtools_agent_host.h" |
38 #include "content/browser/renderer_host/render_process_host.h" | 38 #include "content/browser/renderer_host/render_process_host.h" |
39 #include "content/browser/renderer_host/render_view_host.h" | 39 #include "content/browser/renderer_host/render_view_host.h" |
40 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 40 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
41 #include "content/browser/tab_contents/render_view_host_manager.h" | 41 #include "content/browser/tab_contents/render_view_host_manager.h" |
42 #include "content/browser/tab_contents/tab_contents.h" | 42 #include "content/browser/tab_contents/tab_contents.h" |
43 #include "content/browser/tab_contents/tab_contents_delegate.h" | 43 #include "content/browser/tab_contents/tab_contents_delegate.h" |
44 #include "content/public/browser/notification_observer.h" | 44 #include "content/public/browser/notification_observer.h" |
45 #include "content/public/browser/notification_registrar.h" | 45 #include "content/public/browser/notification_registrar.h" |
46 #include "content/common/notification_service.h" | 46 #include "content/public/browser/notification_source.h" |
47 | 47 |
48 namespace prerender { | 48 namespace prerender { |
49 | 49 |
50 namespace { | 50 namespace { |
51 | 51 |
52 // Time window for which we will record windowed PLT's from the last | 52 // Time window for which we will record windowed PLT's from the last |
53 // observed link rel=prefetch tag. | 53 // observed link rel=prefetch tag. |
54 const int kWindowDurationSeconds = 30; | 54 const int kWindowDurationSeconds = 30; |
55 | 55 |
56 // Time interval at which periodic cleanups are performed. | 56 // Time interval at which periodic cleanups are performed. |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 if (!render_process_host || !render_process_host->browser_context()) | 1011 if (!render_process_host || !render_process_host->browser_context()) |
1012 return NULL; | 1012 return NULL; |
1013 Profile* profile = Profile::FromBrowserContext( | 1013 Profile* profile = Profile::FromBrowserContext( |
1014 render_process_host->browser_context()); | 1014 render_process_host->browser_context()); |
1015 if (!profile) | 1015 if (!profile) |
1016 return NULL; | 1016 return NULL; |
1017 return PrerenderManagerFactory::GetInstance()->GetForProfile(profile); | 1017 return PrerenderManagerFactory::GetInstance()->GetForProfile(profile); |
1018 } | 1018 } |
1019 | 1019 |
1020 } // namespace prerender | 1020 } // namespace prerender |
OLD | NEW |