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

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

Issue 564193002: Clean up forward declarations in Source/core/loader (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add MixedContentChecker 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
« no previous file with comments | « Source/core/loader/HistoryItem.h ('k') | Source/core/loader/PingLoader.h » ('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) 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 19 matching lines...) Expand all
30 30
31 #ifndef MixedContentChecker_h 31 #ifndef MixedContentChecker_h
32 #define MixedContentChecker_h 32 #define MixedContentChecker_h
33 33
34 #include "public/platform/WebURLRequest.h" 34 #include "public/platform/WebURLRequest.h"
35 #include "wtf/text/WTFString.h" 35 #include "wtf/text/WTFString.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class LocalFrame; 39 class LocalFrame;
40 class FrameLoaderClient;
41 class KURL; 40 class KURL;
42 class SecurityOrigin; 41 class SecurityOrigin;
43 class ResourceRequest;
44 42
45 class MixedContentChecker { 43 class MixedContentChecker {
46 WTF_MAKE_NONCOPYABLE(MixedContentChecker); 44 WTF_MAKE_NONCOPYABLE(MixedContentChecker);
47 public: 45 public:
48 static bool shouldBlockFetch(LocalFrame*, WebURLRequest::RequestContext, Web URLRequest::FrameType, const KURL&); 46 static bool shouldBlockFetch(LocalFrame*, WebURLRequest::RequestContext, Web URLRequest::FrameType, const KURL&);
49 static bool shouldBlockWebSocket(LocalFrame*, const KURL&); 47 static bool shouldBlockWebSocket(LocalFrame*, const KURL&);
50 static bool checkFormAction(LocalFrame*, const KURL&); 48 static bool checkFormAction(LocalFrame*, const KURL&);
51 static bool isMixedContent(SecurityOrigin*, const KURL&); 49 static bool isMixedContent(SecurityOrigin*, const KURL&);
52 50
53 private: 51 private:
54 enum ContextType { 52 enum ContextType {
55 ContextTypeBlockable, 53 ContextTypeBlockable,
56 ContextTypeOptionallyBlockable, 54 ContextTypeOptionallyBlockable,
57 ContextTypeShouldBeBlockable, 55 ContextTypeShouldBeBlockable,
58 ContextTypeBlockableUnlessLax 56 ContextTypeBlockableUnlessLax
59 }; 57 };
60 58
61 static LocalFrame* inWhichFrameIsThisContentMixed(LocalFrame*, WebURLRequest ::RequestContext, WebURLRequest::FrameType, const KURL&); 59 static LocalFrame* inWhichFrameIsThisContentMixed(LocalFrame*, WebURLRequest ::RequestContext, WebURLRequest::FrameType, const KURL&);
62 static ContextType contextTypeFromContext(WebURLRequest::RequestContext); 60 static ContextType contextTypeFromContext(WebURLRequest::RequestContext);
63 static const char* typeNameFromContext(WebURLRequest::RequestContext); 61 static const char* typeNameFromContext(WebURLRequest::RequestContext);
64 static void logToConsole(LocalFrame*, const KURL&, WebURLRequest::RequestCon text, bool allowed); 62 static void logToConsole(LocalFrame*, const KURL&, WebURLRequest::RequestCon text, bool allowed);
65 }; 63 };
66 64
67 } // namespace blink 65 } // namespace blink
68 66
69 #endif // MixedContentChecker_h 67 #endif // MixedContentChecker_h
OLDNEW
« no previous file with comments | « Source/core/loader/HistoryItem.h ('k') | Source/core/loader/PingLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698