Chromium Code Reviews| Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp |
| diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp |
| index 7d3d6b1601d97ef33f408ba151ac3de1cd6f6ac4..44dc4fa8af4603370dc8bfc07d2f49592ed9177a 100644 |
| --- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp |
| +++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp |
| @@ -36,6 +36,8 @@ |
| namespace blink { |
| +static const double kMinimumProgressEventDispatchingIntervalInSeconds = .05; // 50 ms per specification. |
|
yhirano
2016/03/01 17:43:54
I generally prefer an unnamed namespace to static.
|
| + |
| XMLHttpRequestProgressEventThrottle::DeferredEvent::DeferredEvent() |
| { |
| clear(); |
| @@ -68,8 +70,6 @@ PassRefPtrWillBeRawPtr<Event> XMLHttpRequestProgressEventThrottle::DeferredEvent |
| return event.release(); |
| } |
| -const double XMLHttpRequestProgressEventThrottle::minimumProgressEventDispatchingIntervalInSeconds = .05; // 50 ms per specification. |
| - |
| XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle(XMLHttpRequest* target) |
| : m_target(target) |
| , m_hasDispatchedProgressProgressEvent(false) |
| @@ -94,7 +94,7 @@ void XMLHttpRequestProgressEventThrottle::dispatchProgressEvent(const AtomicStri |
| m_deferred.set(lengthComputable, loaded, total); |
| } else { |
| dispatchProgressProgressEvent(ProgressEvent::create(EventTypeNames::progress, lengthComputable, loaded, total)); |
| - startOneShot(minimumProgressEventDispatchingIntervalInSeconds, BLINK_FROM_HERE); |
| + startOneShot(kMinimumProgressEventDispatchingIntervalInSeconds, BLINK_FROM_HERE); |
| } |
| } |
| @@ -150,7 +150,7 @@ void XMLHttpRequestProgressEventThrottle::fired() |
| dispatchProgressProgressEvent(m_deferred.take()); |
| // Watch if another "progress" ProgressEvent arrives in the next 50ms. |
| - startOneShot(minimumProgressEventDispatchingIntervalInSeconds, BLINK_FROM_HERE); |
| + startOneShot(kMinimumProgressEventDispatchingIntervalInSeconds, BLINK_FROM_HERE); |
| } |
| void XMLHttpRequestProgressEventThrottle::suspend() |