| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 pending_prerender_list_.erase(it); | 841 pending_prerender_list_.erase(it); |
| 842 return; | 842 return; |
| 843 } | 843 } |
| 844 } | 844 } |
| 845 NOTREACHED(); | 845 NOTREACHED(); |
| 846 } | 846 } |
| 847 | 847 |
| 848 void PrerenderManager::DoShutdown() { | 848 void PrerenderManager::DoShutdown() { |
| 849 DestroyAllContents(FINAL_STATUS_MANAGER_SHUTDOWN); | 849 DestroyAllContents(FINAL_STATUS_MANAGER_SHUTDOWN); |
| 850 STLDeleteElements(&prerender_conditions_); | 850 STLDeleteElements(&prerender_conditions_); |
| 851 on_close_tab_contents_deleters_.reset(); | 851 on_close_tab_contents_deleters_.clear(); |
| 852 profile_ = NULL; | 852 profile_ = NULL; |
| 853 | 853 |
| 854 DCHECK(active_prerender_list_.empty()); | 854 DCHECK(active_prerender_list_.empty()); |
| 855 } | 855 } |
| 856 | 856 |
| 857 // private | 857 // private |
| 858 PrerenderHandle* PrerenderManager::AddPrerender( | 858 PrerenderHandle* PrerenderManager::AddPrerender( |
| 859 Origin origin, | 859 Origin origin, |
| 860 int process_id, | 860 int process_id, |
| 861 const GURL& url_arg, | 861 const GURL& url_arg, |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1224 if (!render_process_host || !render_process_host->GetBrowserContext()) | 1224 if (!render_process_host || !render_process_host->GetBrowserContext()) |
| 1225 return NULL; | 1225 return NULL; |
| 1226 Profile* profile = Profile::FromBrowserContext( | 1226 Profile* profile = Profile::FromBrowserContext( |
| 1227 render_process_host->GetBrowserContext()); | 1227 render_process_host->GetBrowserContext()); |
| 1228 if (!profile) | 1228 if (!profile) |
| 1229 return NULL; | 1229 return NULL; |
| 1230 return PrerenderManagerFactory::GetInstance()->GetForProfile(profile); | 1230 return PrerenderManagerFactory::GetInstance()->GetForProfile(profile); |
| 1231 } | 1231 } |
| 1232 | 1232 |
| 1233 } // namespace prerender | 1233 } // namespace prerender |
| 1234 | |
| OLD | NEW |