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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android build fix Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 // Don't clear the resource as the client may need to access the downloaded 803 // Don't clear the resource as the client may need to access the downloaded
804 // file which will be released when the resource is destoryed. 804 // file which will be released when the resource is destoryed.
805 if (m_async) { 805 if (m_async) {
806 m_timeoutTimer.stop(); 806 m_timeoutTimer.stop();
807 m_requestStartedSeconds = 0.0; 807 m_requestStartedSeconds = 0.0;
808 } 808 }
809 client->didFinishLoading(identifier, finishTime); 809 client->didFinishLoading(identifier, finishTime);
810 // |this| may be dead here in async mode. 810 // |this| may be dead here in async mode.
811 } 811 }
812 812
813 void DocumentThreadableLoader::didTimeout(Timer<DocumentThreadableLoader>* timer ) 813 void DocumentThreadableLoader::didTimeout(TimerBase* timer)
814 { 814 {
815 ASSERT_UNUSED(timer, timer == &m_timeoutTimer); 815 ASSERT_UNUSED(timer, timer == &m_timeoutTimer);
816 816
817 // Using values from net/base/net_error_list.h ERR_TIMED_OUT, 817 // Using values from net/base/net_error_list.h ERR_TIMED_OUT,
818 // Same as existing FIXME above - this error should be coming from FrameLoad erClient to be identifiable. 818 // Same as existing FIXME above - this error should be coming from FrameLoad erClient to be identifiable.
819 static const int timeoutError = -7; 819 static const int timeoutError = -7;
820 ResourceError error("net", timeoutError, resource()->url(), String()); 820 ResourceError error("net", timeoutError, resource()->url(), String());
821 error.setIsTimeout(true); 821 error.setIsTimeout(true);
822 cancelWithError(error); 822 cancelWithError(error);
823 // |this| may be dead here. 823 // |this| may be dead here.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri gin(); 1015 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri gin();
1016 } 1016 }
1017 1017
1018 Document& DocumentThreadableLoader::document() const 1018 Document& DocumentThreadableLoader::document() const
1019 { 1019 {
1020 ASSERT(m_document); 1020 ASSERT(m_document);
1021 return *m_document; 1021 return *m_document;
1022 } 1022 }
1023 1023
1024 } // namespace blink 1024 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698