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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp

Issue 2814703004: Make blink::ResourceRequest ctors explicit (Closed)
Patch Set: simplify Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 return false; 321 return false;
322 } 322 }
323 323
324 if (!SubframeLoadingDisabler::CanLoadFrame(*this)) 324 if (!SubframeLoadingDisabler::CanLoadFrame(*this))
325 return false; 325 return false;
326 326
327 if (GetDocument().GetFrame()->GetPage()->SubframeCount() >= 327 if (GetDocument().GetFrame()->GetPage()->SubframeCount() >=
328 Page::kMaxNumberOfFrames) 328 Page::kMaxNumberOfFrames)
329 return false; 329 return false;
330 330
331 FrameLoadRequest frame_load_request(&GetDocument(), url, "_self", 331 FrameLoadRequest frame_load_request(&GetDocument(), ResourceRequest(url),
332 kCheckContentSecurityPolicy); 332 "_self", kCheckContentSecurityPolicy);
333 333
334 ReferrerPolicy policy = ReferrerPolicyAttribute(); 334 ReferrerPolicy policy = ReferrerPolicyAttribute();
335 if (policy != kReferrerPolicyDefault) 335 if (policy != kReferrerPolicyDefault)
336 frame_load_request.GetResourceRequest().SetHTTPReferrer( 336 frame_load_request.GetResourceRequest().SetHTTPReferrer(
337 SecurityPolicy::GenerateReferrer(policy, url, 337 SecurityPolicy::GenerateReferrer(policy, url,
338 GetDocument().OutgoingReferrer())); 338 GetDocument().OutgoingReferrer()));
339 339
340 return parent_frame->Loader().Client()->CreateFrame(frame_load_request, 340 return parent_frame->Loader().Client()->CreateFrame(frame_load_request,
341 frame_name, this); 341 frame_name, this);
342 } 342 }
343 343
344 DEFINE_TRACE(HTMLFrameOwnerElement) { 344 DEFINE_TRACE(HTMLFrameOwnerElement) {
345 visitor->Trace(content_frame_); 345 visitor->Trace(content_frame_);
346 visitor->Trace(widget_); 346 visitor->Trace(widget_);
347 HTMLElement::Trace(visitor); 347 HTMLElement::Trace(visitor);
348 FrameOwner::Trace(visitor); 348 FrameOwner::Trace(visitor);
349 } 349 }
350 350
351 } // namespace blink 351 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698