 Chromium Code Reviews
 Chromium Code Reviews Issue 1006793002:
  Add new method xhrSucceeded() to WebAutofillClient.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 1006793002:
  Add new method xhrSucceeded() to WebAutofillClient.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 
| 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> | 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> | 
| 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> | 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> | 
| 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. | 
| 6 * Copyright (C) 2012 Intel Corporation | 6 * Copyright (C) 2012 Intel Corporation | 
| 7 * | 7 * | 
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or | 
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public | 
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 #include "core/frame/Settings.h" | 44 #include "core/frame/Settings.h" | 
| 45 #include "core/frame/UseCounter.h" | 45 #include "core/frame/UseCounter.h" | 
| 46 #include "core/frame/csp/ContentSecurityPolicy.h" | 46 #include "core/frame/csp/ContentSecurityPolicy.h" | 
| 47 #include "core/html/DOMFormData.h" | 47 #include "core/html/DOMFormData.h" | 
| 48 #include "core/html/HTMLDocument.h" | 48 #include "core/html/HTMLDocument.h" | 
| 49 #include "core/html/parser/TextResourceDecoder.h" | 49 #include "core/html/parser/TextResourceDecoder.h" | 
| 50 #include "core/inspector/ConsoleMessage.h" | 50 #include "core/inspector/ConsoleMessage.h" | 
| 51 #include "core/inspector/InspectorInstrumentation.h" | 51 #include "core/inspector/InspectorInstrumentation.h" | 
| 52 #include "core/inspector/InspectorTraceEvents.h" | 52 #include "core/inspector/InspectorTraceEvents.h" | 
| 53 #include "core/loader/ThreadableLoader.h" | 53 #include "core/loader/ThreadableLoader.h" | 
| 54 #include "core/page/Chrome.h" | |
| 55 #include "core/page/ChromeClient.h" | |
| 56 #include "core/page/Page.h" | |
| 54 #include "core/streams/ReadableStream.h" | 57 #include "core/streams/ReadableStream.h" | 
| 55 #include "core/streams/ReadableStreamImpl.h" | 58 #include "core/streams/ReadableStreamImpl.h" | 
| 56 #include "core/streams/Stream.h" | 59 #include "core/streams/Stream.h" | 
| 57 #include "core/streams/UnderlyingSource.h" | 60 #include "core/streams/UnderlyingSource.h" | 
| 58 #include "core/xmlhttprequest/XMLHttpRequestProgressEvent.h" | 61 #include "core/xmlhttprequest/XMLHttpRequestProgressEvent.h" | 
| 59 #include "core/xmlhttprequest/XMLHttpRequestUpload.h" | 62 #include "core/xmlhttprequest/XMLHttpRequestUpload.h" | 
| 60 #include "platform/Logging.h" | 63 #include "platform/Logging.h" | 
| 61 #include "platform/RuntimeEnabledFeatures.h" | 64 #include "platform/RuntimeEnabledFeatures.h" | 
| 62 #include "platform/SharedBuffer.h" | 65 #include "platform/SharedBuffer.h" | 
| 63 #include "platform/blob/BlobData.h" | 66 #include "platform/blob/BlobData.h" | 
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 658 m_progressEventThrottle.dispatchReadyStateChangeEvent(Event::create(Even tTypeNames::readystatechange), action); | 661 m_progressEventThrottle.dispatchReadyStateChangeEvent(Event::create(Even tTypeNames::readystatechange), action); | 
| 659 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateCounters", "data", InspectorUpdateCountersEvent::data()); | 662 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateCounters", "data", InspectorUpdateCountersEvent::data()); | 
| 660 } | 663 } | 
| 661 | 664 | 
| 662 if (m_state == DONE && !m_error) { | 665 if (m_state == DONE && !m_error) { | 
| 663 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "XHRLoad", "data", InspectorXhrLoadEvent::data(executionContext(), this)); | 666 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "XHRLoad", "data", InspectorXhrLoadEvent::data(executionContext(), this)); | 
| 664 dispatchProgressEventFromSnapshot(EventTypeNames::load); | 667 dispatchProgressEventFromSnapshot(EventTypeNames::load); | 
| 665 dispatchProgressEventFromSnapshot(EventTypeNames::loadend); | 668 dispatchProgressEventFromSnapshot(EventTypeNames::loadend); | 
| 666 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateCounters", "data", InspectorUpdateCountersEvent::data()); | 669 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateCounters", "data", InspectorUpdateCountersEvent::data()); | 
| 667 } | 670 } | 
| 671 if (!document() || !document()->frame() || !document()->frame()->page()) | |
| 672 return; | |
| 
tyoshino (SeeGerritForStatus)
2015/03/16 08:59:28
move also this to L1581?
 
Mike West
2015/03/16 09:02:43
This doesn't make much sense. You're returning out
 
Garrett Casto
2015/03/16 17:31:55
Done.
 
Garrett Casto
2015/03/16 17:31:55
Should have been moved to 1581.
 | |
| 668 } | 673 } | 
| 669 | 674 | 
| 670 void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionSta te) | 675 void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionSta te) | 
| 671 { | 676 { | 
| 672 if (m_state > OPENED || m_loader) { | 677 if (m_state > OPENED || m_loader) { | 
| 673 exceptionState.throwDOMException(InvalidStateError, "The value may only be set if the object's state is UNSENT or OPENED."); | 678 exceptionState.throwDOMException(InvalidStateError, "The value may only be set if the object's state is UNSENT or OPENED."); | 
| 674 return; | 679 return; | 
| 675 } | 680 } | 
| 676 | 681 | 
| 677 // FIXME: According to XMLHttpRequest Level 2 we should throw InvalidAccessE rror exception here. | 682 // FIXME: According to XMLHttpRequest Level 2 we should throw InvalidAccessE rror exception here. | 
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1566 | 1571 | 
| 1567 void XMLHttpRequest::endLoading() | 1572 void XMLHttpRequest::endLoading() | 
| 1568 { | 1573 { | 
| 1569 InspectorInstrumentation::didFinishXHRLoading(executionContext(), this, this , m_loaderIdentifier, m_responseText, m_method, m_url); | 1574 InspectorInstrumentation::didFinishXHRLoading(executionContext(), this, this , m_loaderIdentifier, m_responseText, m_method, m_url); | 
| 1570 | 1575 | 
| 1571 if (m_loader) | 1576 if (m_loader) | 
| 1572 m_loader = nullptr; | 1577 m_loader = nullptr; | 
| 1573 m_loaderIdentifier = 0; | 1578 m_loaderIdentifier = 0; | 
| 1574 | 1579 | 
| 1575 changeState(DONE); | 1580 changeState(DONE); | 
| 1581 | |
| 1582 if (status() >= 200 && status() < 300) | |
| 1583 document()->frame()->page()->chrome().client().xhrSucceeded(document()-> frame()); | |
| 
Mike West
2015/03/16 09:02:43
Did you mean to move them here?
 | |
| 1576 } | 1584 } | 
| 1577 | 1585 | 
| 1578 void XMLHttpRequest::didSendData(unsigned long long bytesSent, unsigned long lon g totalBytesToBeSent) | 1586 void XMLHttpRequest::didSendData(unsigned long long bytesSent, unsigned long lon g totalBytesToBeSent) | 
| 1579 { | 1587 { | 
| 1580 WTF_LOG(Network, "XMLHttpRequest %p didSendData(%llu, %llu)", this, bytesSen t, totalBytesToBeSent); | 1588 WTF_LOG(Network, "XMLHttpRequest %p didSendData(%llu, %llu)", this, bytesSen t, totalBytesToBeSent); | 
| 1581 ScopedEventDispatchProtect protect(&m_eventDispatchRecursionLevel); | 1589 ScopedEventDispatchProtect protect(&m_eventDispatchRecursionLevel); | 
| 1582 | 1590 | 
| 1583 if (!m_upload) | 1591 if (!m_upload) | 
| 1584 return; | 1592 return; | 
| 1585 | 1593 | 
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1817 visitor->trace(m_responseDocumentParser); | 1825 visitor->trace(m_responseDocumentParser); | 
| 1818 visitor->trace(m_progressEventThrottle); | 1826 visitor->trace(m_progressEventThrottle); | 
| 1819 visitor->trace(m_upload); | 1827 visitor->trace(m_upload); | 
| 1820 visitor->trace(m_blobLoader); | 1828 visitor->trace(m_blobLoader); | 
| 1821 XMLHttpRequestEventTarget::trace(visitor); | 1829 XMLHttpRequestEventTarget::trace(visitor); | 
| 1822 DocumentParserClient::trace(visitor); | 1830 DocumentParserClient::trace(visitor); | 
| 1823 ActiveDOMObject::trace(visitor); | 1831 ActiveDOMObject::trace(visitor); | 
| 1824 } | 1832 } | 
| 1825 | 1833 | 
| 1826 } // namespace blink | 1834 } // namespace blink | 
| OLD | NEW |