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

Side by Side Diff: Source/core/loader/MixedContentChecker.h

Issue 564123002: Measure resources from private IP addresses in public websites. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class ResourceRequest; 43 class ResourceRequest;
44 44
45 class MixedContentChecker { 45 class MixedContentChecker {
46 WTF_MAKE_NONCOPYABLE(MixedContentChecker); 46 WTF_MAKE_NONCOPYABLE(MixedContentChecker);
47 public: 47 public:
48 static bool shouldBlockFetch(LocalFrame*, WebURLRequest::RequestContext, Web URLRequest::FrameType, const KURL&); 48 static bool shouldBlockFetch(LocalFrame*, WebURLRequest::RequestContext, Web URLRequest::FrameType, const KURL&);
49 static bool shouldBlockWebSocket(LocalFrame*, const KURL&); 49 static bool shouldBlockWebSocket(LocalFrame*, const KURL&);
50 static bool checkFormAction(LocalFrame*, const KURL&); 50 static bool checkFormAction(LocalFrame*, const KURL&);
51 static bool isMixedContent(SecurityOrigin*, const KURL&); 51 static bool isMixedContent(SecurityOrigin*, const KURL&);
52 52
53 static bool checkMixedPrivatePublic(LocalFrame*, const AtomicString& resourc eIPAddress);
54
53 private: 55 private:
54 enum ContextType { 56 enum ContextType {
55 ContextTypeBlockable, 57 ContextTypeBlockable,
56 ContextTypeOptionallyBlockable, 58 ContextTypeOptionallyBlockable,
57 ContextTypeShouldBeBlockable, 59 ContextTypeShouldBeBlockable,
58 ContextTypeBlockableUnlessLax 60 ContextTypeBlockableUnlessLax
59 }; 61 };
60 62
61 static LocalFrame* inWhichFrameIsThisContentMixed(LocalFrame*, WebURLRequest ::RequestContext, WebURLRequest::FrameType, const KURL&); 63 static LocalFrame* inWhichFrameIsThisContentMixed(LocalFrame*, WebURLRequest ::RequestContext, WebURLRequest::FrameType, const KURL&);
62 static ContextType contextTypeFromContext(WebURLRequest::RequestContext); 64 static ContextType contextTypeFromContext(WebURLRequest::RequestContext);
63 static const char* typeNameFromContext(WebURLRequest::RequestContext); 65 static const char* typeNameFromContext(WebURLRequest::RequestContext);
64 static void logToConsole(LocalFrame*, const KURL&, WebURLRequest::RequestCon text, bool allowed); 66 static void logToConsole(LocalFrame*, const KURL&, WebURLRequest::RequestCon text, bool allowed);
65 }; 67 };
66 68
67 } // namespace blink 69 } // namespace blink
68 70
69 #endif // MixedContentChecker_h 71 #endif // MixedContentChecker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698