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

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: Sync Created 8 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/search_engines/template_url_service.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) 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 PrerenderHandle* PrerenderManager::AddPrerenderFromLinkRelPrerender( 202 PrerenderHandle* PrerenderManager::AddPrerenderFromLinkRelPrerender(
203 int process_id, 203 int process_id,
204 int route_id, 204 int route_id,
205 const GURL& url, 205 const GURL& url,
206 const content::Referrer& referrer, 206 const content::Referrer& referrer,
207 const gfx::Size& size) { 207 const gfx::Size& size) {
208 #if defined(OS_ANDROID) 208 #if defined(OS_ANDROID)
209 // TODO(jcivelli): http://crbug.com/113322 We should have an option to disable 209 // TODO(jcivelli): http://crbug.com/113322 We should have an option to disable
210 // link-prerender and enable omnibox-prerender only. 210 // link-prerender and enable omnibox-prerender only.
211 return false; 211 return NULL;
212 #else 212 #else
213 DCHECK(!size.IsEmpty()); 213 DCHECK(!size.IsEmpty());
214 if (PrerenderData* parent_prerender_data = 214 if (PrerenderData* parent_prerender_data =
215 FindPrerenderDataForChildAndRoute(process_id, route_id)) { 215 FindPrerenderDataForChildAndRoute(process_id, route_id)) {
216 // Instead of prerendering from inside of a running prerender, we will defer 216 // Instead of prerendering from inside of a running prerender, we will defer
217 // this request until its launcher is made visible. 217 // this request until its launcher is made visible.
218 if (PrerenderContents* contents = parent_prerender_data->contents_) { 218 if (PrerenderContents* contents = parent_prerender_data->contents_) {
219 pending_prerender_list_.push_back( 219 pending_prerender_list_.push_back(
220 linked_ptr<PrerenderData>(new PrerenderData(this))); 220 linked_ptr<PrerenderData>(new PrerenderData(this)));
221 PrerenderHandle* prerender_handle = 221 PrerenderHandle* prerender_handle =
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 if (!render_process_host || !render_process_host->GetBrowserContext()) 1229 if (!render_process_host || !render_process_host->GetBrowserContext())
1230 return NULL; 1230 return NULL;
1231 Profile* profile = Profile::FromBrowserContext( 1231 Profile* profile = Profile::FromBrowserContext(
1232 render_process_host->GetBrowserContext()); 1232 render_process_host->GetBrowserContext());
1233 if (!profile) 1233 if (!profile)
1234 return NULL; 1234 return NULL;
1235 return PrerenderManagerFactory::GetInstance()->GetForProfile(profile); 1235 return PrerenderManagerFactory::GetInstance()->GetForProfile(profile);
1236 } 1236 }
1237 1237
1238 } // namespace prerender 1238 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698