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

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

Issue 10821061: The changes for compiling with Android NDK r8b (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
OLDNEW
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 PrerenderHandle* PrerenderManager::AddPrerenderFromLinkRelPrerender( 208 PrerenderHandle* PrerenderManager::AddPrerenderFromLinkRelPrerender(
209 int process_id, 209 int process_id,
210 int route_id, 210 int route_id,
211 const GURL& url, 211 const GURL& url,
212 const content::Referrer& referrer, 212 const content::Referrer& referrer,
213 const gfx::Size& size) { 213 const gfx::Size& size) {
214 #if defined(OS_ANDROID) 214 #if defined(OS_ANDROID)
215 // TODO(jcivelli): http://crbug.com/113322 We should have an option to disable 215 // TODO(jcivelli): http://crbug.com/113322 We should have an option to disable
216 // link-prerender and enable omnibox-prerender only. 216 // link-prerender and enable omnibox-prerender only.
217 return false; 217 return NULL;
gavinp 2012/07/27 17:40:27 Thanks for catching this. I should have done this
218 #else 218 #else
219 DCHECK(!size.IsEmpty()); 219 DCHECK(!size.IsEmpty());
220 if (PrerenderData* parent_prerender_data = 220 if (PrerenderData* parent_prerender_data =
221 FindPrerenderDataForChildAndRoute(process_id, route_id)) { 221 FindPrerenderDataForChildAndRoute(process_id, route_id)) {
222 // Instead of prerendering from inside of a running prerender, we will defer 222 // Instead of prerendering from inside of a running prerender, we will defer
223 // this request until its launcher is made visible. 223 // this request until its launcher is made visible.
224 if (PrerenderContents* contents = parent_prerender_data->contents_) { 224 if (PrerenderContents* contents = parent_prerender_data->contents_) {
225 pending_prerender_list_.push_back( 225 pending_prerender_list_.push_back(
226 linked_ptr<PrerenderData>(new PrerenderData(this))); 226 linked_ptr<PrerenderData>(new PrerenderData(this)));
227 PrerenderHandle* prerender_handle = 227 PrerenderHandle* prerender_handle =
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698