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

Side by Side Diff: Source/core/page/ContentSecurityPolicy.cpp

Issue 14070021: Rename 'UseCounter::observe' to 'UseCounter::count'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | 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 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 ASSERT(m_policies.isEmpty()); 1452 ASSERT(m_policies.isEmpty());
1453 for (CSPDirectiveListVector::const_iterator iter = other->m_policies.begin() ; iter != other->m_policies.end(); ++iter) 1453 for (CSPDirectiveListVector::const_iterator iter = other->m_policies.begin() ; iter != other->m_policies.end(); ++iter)
1454 didReceiveHeader((*iter)->header(), (*iter)->headerType()); 1454 didReceiveHeader((*iter)->header(), (*iter)->headerType());
1455 } 1455 }
1456 1456
1457 void ContentSecurityPolicy::didReceiveHeader(const String& header, HeaderType ty pe) 1457 void ContentSecurityPolicy::didReceiveHeader(const String& header, HeaderType ty pe)
1458 { 1458 {
1459 if (m_scriptExecutionContext->isDocument()) { 1459 if (m_scriptExecutionContext->isDocument()) {
1460 Document* document = toDocument(m_scriptExecutionContext); 1460 Document* document = toDocument(m_scriptExecutionContext);
1461 if (type == PrefixedReport || type == PrefixedEnforce) 1461 if (type == PrefixedReport || type == PrefixedEnforce)
1462 UseCounter::measureDeprecatedFeature(document, getUseCounterType(typ e)); 1462 UseCounter::countDeprecation(document, getUseCounterType(type));
1463 else 1463 else
1464 UseCounter::observe(document, getUseCounterType(type)); 1464 UseCounter::count(document, getUseCounterType(type));
1465 } 1465 }
1466 1466
1467 // RFC2616, section 4.2 specifies that headers appearing multiple times can 1467 // RFC2616, section 4.2 specifies that headers appearing multiple times can
1468 // be combined with a comma. Walk the header string, and parse each comma 1468 // be combined with a comma. Walk the header string, and parse each comma
1469 // separated chunk as a separate header. 1469 // separated chunk as a separate header.
1470 const UChar* begin = header.characters(); 1470 const UChar* begin = header.characters();
1471 const UChar* position = begin; 1471 const UChar* position = begin;
1472 const UChar* end = begin + header.length(); 1472 const UChar* end = begin + header.length();
1473 while (position < end) { 1473 while (position < end) {
1474 skipUntil(position, end, ','); 1474 skipUntil(position, end, ',');
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 { 1884 {
1885 InspectorInstrumentation::scriptExecutionBlockedByCSP(m_scriptExecutionConte xt, directiveText); 1885 InspectorInstrumentation::scriptExecutionBlockedByCSP(m_scriptExecutionConte xt, directiveText);
1886 } 1886 }
1887 1887
1888 bool ContentSecurityPolicy::experimentalFeaturesEnabled() const 1888 bool ContentSecurityPolicy::experimentalFeaturesEnabled() const
1889 { 1889 {
1890 return RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnab led(); 1890 return RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnab led();
1891 } 1891 }
1892 1892
1893 } 1893 }
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698