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

Unified Diff: Source/WebCore/page/ContentSecurityPolicy.cpp

Issue 14301003: Rename FeatureObserver to UseCounter to make clear that all it stores are usage counts. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Now with 20% more awesome 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 side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/page/ContentSecurityPolicy.cpp
diff --git a/Source/WebCore/page/ContentSecurityPolicy.cpp b/Source/WebCore/page/ContentSecurityPolicy.cpp
index 641fcb513d8cb3763795365c5f2b1b11461b2e98..55f04945e439dd9786a69283000240182ccb5514 100644
--- a/Source/WebCore/page/ContentSecurityPolicy.cpp
+++ b/Source/WebCore/page/ContentSecurityPolicy.cpp
@@ -29,7 +29,7 @@
#include "Console.h"
#include "DOMStringList.h"
#include "Document.h"
-#include "FeatureObserver.h"
+#include "UseCounter.h"
#include "FormData.h"
#include "FormDataList.h"
#include "Frame.h"
@@ -147,20 +147,20 @@ bool isDirectiveName(const String& name)
);
}
-FeatureObserver::Feature getFeatureObserverType(ContentSecurityPolicy::HeaderType type)
+UseCounter::Feature getUseCounterType(ContentSecurityPolicy::HeaderType type)
{
switch (type) {
case ContentSecurityPolicy::PrefixedEnforce:
- return FeatureObserver::PrefixedContentSecurityPolicy;
+ return UseCounter::PrefixedContentSecurityPolicy;
case ContentSecurityPolicy::Enforce:
- return FeatureObserver::ContentSecurityPolicy;
+ return UseCounter::ContentSecurityPolicy;
case ContentSecurityPolicy::PrefixedReport:
- return FeatureObserver::PrefixedContentSecurityPolicyReportOnly;
+ return UseCounter::PrefixedContentSecurityPolicyReportOnly;
case ContentSecurityPolicy::Report:
- return FeatureObserver::ContentSecurityPolicyReportOnly;
+ return UseCounter::ContentSecurityPolicyReportOnly;
}
ASSERT_NOT_REACHED();
- return FeatureObserver::NumberOfFeatures;
+ return UseCounter::NumberOfFeatures;
}
const ScriptCallFrame& getFirstNonNativeFrame(PassRefPtr<ScriptCallStack> stack)
@@ -1458,7 +1458,7 @@ void ContentSecurityPolicy::didReceiveHeader(const String& header, HeaderType ty
if (m_scriptExecutionContext->isDocument()) {
Document* document = toDocument(m_scriptExecutionContext);
if (document->domWindow())
- FeatureObserver::observe(document->domWindow(), getFeatureObserverType(type));
+ UseCounter::observe(document->domWindow(), getUseCounterType(type));
}
// RFC2616, section 4.2 specifies that headers appearing multiple times can

Powered by Google App Engine
This is Rietveld 408576698