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

Side by Side Diff: Source/core/frame/csp/ContentSecurityPolicy.cpp

Issue 561703002: Fix oilpan build after CSP changes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Actual fix Created 6 years, 3 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 | « Source/core/frame/csp/ContentSecurityPolicy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google, Inc. All rights reserved. 2 * Copyright (C) 2011 Google, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 void ContentSecurityPolicy::reportMissingReportURI(const String& policy) 784 void ContentSecurityPolicy::reportMissingReportURI(const String& policy)
785 { 785 {
786 logToConsole("The Content Security Policy '" + policy + "' was delivered in report-only mode, but does not specify a 'report-uri'; the policy will have no e ffect. Please either add a 'report-uri' directive, or deliver the policy via the 'Content-Security-Policy' header."); 786 logToConsole("The Content Security Policy '" + policy + "' was delivered in report-only mode, but does not specify a 'report-uri'; the policy will have no e ffect. Please either add a 'report-uri' directive, or deliver the policy via the 'Content-Security-Policy' header.");
787 } 787 }
788 788
789 void ContentSecurityPolicy::logToConsole(const String& message, MessageLevel lev el) 789 void ContentSecurityPolicy::logToConsole(const String& message, MessageLevel lev el)
790 { 790 {
791 logToConsole(ConsoleMessage::create(SecurityMessageSource, level, message)); 791 logToConsole(ConsoleMessage::create(SecurityMessageSource, level, message));
792 } 792 }
793 793
794 void ContentSecurityPolicy::logToConsole(PassRefPtr<ConsoleMessage> consoleMessa ge) 794 void ContentSecurityPolicy::logToConsole(PassRefPtrWillBeRawPtr<ConsoleMessage> consoleMessage)
795 { 795 {
796 if (m_executionContext) 796 if (m_executionContext)
797 m_executionContext->addConsoleMessage(consoleMessage); 797 m_executionContext->addConsoleMessage(consoleMessage);
798 else 798 else
799 m_consoleMessages.append(consoleMessage); 799 m_consoleMessages.append(consoleMessage);
800 } 800 }
801 801
802 void ContentSecurityPolicy::reportBlockedScriptExecutionToInspector(const String & directiveText) const 802 void ContentSecurityPolicy::reportBlockedScriptExecutionToInspector(const String & directiveText) const
803 { 803 {
804 m_executionContext->reportBlockedScriptExecutionToInspector(directiveText); 804 m_executionContext->reportBlockedScriptExecutionToInspector(directiveText);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 // Collisions have no security impact, so we can save space by storing only the string's hash rather than the whole report. 837 // Collisions have no security impact, so we can save space by storing only the string's hash rather than the whole report.
838 return !m_violationReportsSent.contains(report.impl()->hash()); 838 return !m_violationReportsSent.contains(report.impl()->hash());
839 } 839 }
840 840
841 void ContentSecurityPolicy::didSendViolationReport(const String& report) 841 void ContentSecurityPolicy::didSendViolationReport(const String& report)
842 { 842 {
843 m_violationReportsSent.add(report.impl()->hash()); 843 m_violationReportsSent.add(report.impl()->hash());
844 } 844 }
845 845
846 } // namespace blink 846 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/csp/ContentSecurityPolicy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698