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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 1998353003: Reduce ConsoleMessage API surface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1999463002
Patch Set: rebased Created 4 years, 7 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, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 return; 386 return;
387 } 387 }
388 388
389 // 'frame-ancestors' obviates 'x-frame-options': https://w3c.github.io/webap psec/specs/content-security-policy/#frame-ancestors-and-frame-options 389 // 'frame-ancestors' obviates 'x-frame-options': https://w3c.github.io/webap psec/specs/content-security-policy/#frame-ancestors-and-frame-options
390 if (!m_contentSecurityPolicy->isFrameAncestorsEnforced()) { 390 if (!m_contentSecurityPolicy->isFrameAncestorsEnforced()) {
391 HTTPHeaderMap::const_iterator it = response.httpHeaderFields().find(HTTP Names::X_Frame_Options); 391 HTTPHeaderMap::const_iterator it = response.httpHeaderFields().find(HTTP Names::X_Frame_Options);
392 if (it != response.httpHeaderFields().end()) { 392 if (it != response.httpHeaderFields().end()) {
393 String content = it->value; 393 String content = it->value;
394 if (frameLoader()->shouldInterruptLoadForXFrameOptions(content, resp onse.url(), mainResourceIdentifier())) { 394 if (frameLoader()->shouldInterruptLoadForXFrameOptions(content, resp onse.url(), mainResourceIdentifier())) {
395 String message = "Refused to display '" + response.url().elidedS tring() + "' in a frame because it set 'X-Frame-Options' to '" + content + "'."; 395 String message = "Refused to display '" + response.url().elidedS tring() + "' in a frame because it set 'X-Frame-Options' to '" + content + "'.";
396 ConsoleMessage* consoleMessage = ConsoleMessage::create(Security MessageSource, ErrorMessageLevel, message); 396 ConsoleMessage* consoleMessage = ConsoleMessage::createForReques t(SecurityMessageSource, ErrorMessageLevel, message, response.url(), mainResourc eIdentifier());
397 consoleMessage->setRequestIdentifier(mainResourceIdentifier());
398 frame()->document()->addConsoleMessage(consoleMessage); 397 frame()->document()->addConsoleMessage(consoleMessage);
399 398
400 cancelLoadAfterXFrameOptionsOrCSPDenied(response); 399 cancelLoadAfterXFrameOptionsOrCSPDenied(response);
401 return; 400 return;
402 } 401 }
403 } 402 }
404 } 403 }
405 404
406 ASSERT(!m_frame->page()->defersLoading()); 405 ASSERT(!m_frame->page()->defersLoading());
407 406
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 { 684 {
686 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); 685 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing);
687 if (!source.isNull()) 686 if (!source.isNull())
688 m_writer->appendReplacingData(source); 687 m_writer->appendReplacingData(source);
689 endWriting(m_writer.get()); 688 endWriting(m_writer.get());
690 } 689 }
691 690
692 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 691 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
693 692
694 } // namespace blink 693 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698