| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 #include <algorithm> | 84 #include <algorithm> |
| 85 #include <memory> | 85 #include <memory> |
| 86 | 86 |
| 87 namespace blink { | 87 namespace blink { |
| 88 | 88 |
| 89 namespace { | 89 namespace { |
| 90 | 90 |
| 91 void emitWarningForDocWriteScripts(const String& url, Document& document) { | 91 void emitWarningForDocWriteScripts(const String& url, Document& document) { |
| 92 String message = | 92 String message = |
| 93 "A Parser-blocking, cross site (i.e. different eTLD+1) script, " + url + | 93 "A Parser-blocking, cross site (i.e. different eTLD+1) script, " + url + |
| 94 ", is invoked via document.write. This may be blocked by " | 94 ", is invoked via document.write. This MAY be blocked by " |
| 95 "the browser if the device has poor network connectivity. " | 95 "the browser in this or a future page load due to poor network " |
| 96 "connectivity. If blocked in this page load, it will be confirmed in a " |
| 97 "subsequent console message." |
| 96 "See https://www.chromestatus.com/feature/5718547946799104 " | 98 "See https://www.chromestatus.com/feature/5718547946799104 " |
| 97 "for more details."; | 99 "for more details."; |
| 98 document.addConsoleMessage( | 100 document.addConsoleMessage( |
| 99 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); | 101 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); |
| 100 WTFLogAlways("%s", message.utf8().data()); | 102 WTFLogAlways("%s", message.utf8().data()); |
| 101 } | 103 } |
| 102 | 104 |
| 103 bool isConnectionEffectively2G(WebEffectiveConnectionType effectiveType) { | 105 bool isConnectionEffectively2G(WebEffectiveConnectionType effectiveType) { |
| 104 switch (effectiveType) { | 106 switch (effectiveType) { |
| 105 case WebEffectiveConnectionType::TypeSlow2G: | 107 case WebEffectiveConnectionType::TypeSlow2G: |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 response); | 1076 response); |
| 1075 } | 1077 } |
| 1076 | 1078 |
| 1077 DEFINE_TRACE(FrameFetchContext) { | 1079 DEFINE_TRACE(FrameFetchContext) { |
| 1078 visitor->trace(m_document); | 1080 visitor->trace(m_document); |
| 1079 visitor->trace(m_documentLoader); | 1081 visitor->trace(m_documentLoader); |
| 1080 FetchContext::trace(visitor); | 1082 FetchContext::trace(visitor); |
| 1081 } | 1083 } |
| 1082 | 1084 |
| 1083 } // namespace blink | 1085 } // namespace blink |
| OLD | NEW |