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

Side by Side Diff: chrome/renderer/prerender/prerender_dispatcher.cc

Issue 2326153003: Rename referrerPolicy() methods to getReferrerPolicy(). (Closed)
Patch Set: . Created 4 years 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
« no previous file with comments | « no previous file | content/child/web_url_loader_impl.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/renderer/prerender/prerender_dispatcher.h" 5 #include "chrome/renderer/prerender/prerender_dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/common/prerender_messages.h" 10 #include "chrome/common/prerender_messages.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 PrerenderAttributes attributes; 152 PrerenderAttributes attributes;
153 attributes.url = GURL(prerender.url()); 153 attributes.url = GURL(prerender.url());
154 attributes.rel_types = prerender.relTypes(); 154 attributes.rel_types = prerender.relTypes();
155 155
156 content::RenderThread::Get()->Send(new PrerenderHostMsg_AddLinkRelPrerender( 156 content::RenderThread::Get()->Send(new PrerenderHostMsg_AddLinkRelPrerender(
157 extra_data.prerender_id(), attributes, 157 extra_data.prerender_id(), attributes,
158 content::Referrer::SanitizeForRequest( 158 content::Referrer::SanitizeForRequest(
159 GURL(prerender.url()), 159 GURL(prerender.url()),
160 content::Referrer(blink::WebStringToGURL(prerender.referrer()), 160 content::Referrer(blink::WebStringToGURL(prerender.referrer()),
161 prerender.referrerPolicy())), 161 prerender.getReferrerPolicy())),
162 extra_data.size(), extra_data.render_view_route_id())); 162 extra_data.size(), extra_data.render_view_route_id()));
163 } 163 }
164 164
165 void PrerenderDispatcher::cancel(const WebPrerender& prerender) { 165 void PrerenderDispatcher::cancel(const WebPrerender& prerender) {
166 const PrerenderExtraData& extra_data = 166 const PrerenderExtraData& extra_data =
167 PrerenderExtraData::FromPrerender(prerender); 167 PrerenderExtraData::FromPrerender(prerender);
168 content::RenderThread::Get()->Send( 168 content::RenderThread::Get()->Send(
169 new PrerenderHostMsg_CancelLinkRelPrerender(extra_data.prerender_id())); 169 new PrerenderHostMsg_CancelLinkRelPrerender(extra_data.prerender_id()));
170 // The browser will not send an OnPrerenderStop (the prerender may have even 170 // The browser will not send an OnPrerenderStop (the prerender may have even
171 // been canceled before it was started), so release it to avoid a 171 // been canceled before it was started), so release it to avoid a
(...skipping 12 matching lines...) Expand all
184 // leak. Moreover, if it did, the PrerenderClient in Blink will have been 184 // leak. Moreover, if it did, the PrerenderClient in Blink will have been
185 // detached already. 185 // detached already.
186 prerenders_.erase(extra_data.prerender_id()); 186 prerenders_.erase(extra_data.prerender_id());
187 } 187 }
188 188
189 void PrerenderDispatcher::prefetchFinished() { 189 void PrerenderDispatcher::prefetchFinished() {
190 content::RenderThread::Get()->Send(new PrerenderHostMsg_PrefetchFinished()); 190 content::RenderThread::Get()->Send(new PrerenderHostMsg_PrefetchFinished());
191 } 191 }
192 192
193 } // namespace prerender 193 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698