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

Side by Side Diff: third_party/WebKit/Source/core/fetch/Resource.cpp

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More build fixes 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) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
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 Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 if (!m_loader) 758 if (!m_loader)
759 return; 759 return;
760 if (m_type == Raw) 760 if (m_type == Raw)
761 cancelTimerFired(&m_cancelTimer); 761 cancelTimerFired(&m_cancelTimer);
762 else if (!m_cancelTimer.isActive()) 762 else if (!m_cancelTimer.isActive())
763 m_cancelTimer.startOneShot(0, BLINK_FROM_HERE); 763 m_cancelTimer.startOneShot(0, BLINK_FROM_HERE);
764 764
765 unlock(); 765 unlock();
766 } 766 }
767 767
768 void Resource::cancelTimerFired(Timer<Resource>* timer) 768 void Resource::cancelTimerFired(TimerBase* timer)
769 { 769 {
770 ASSERT_UNUSED(timer, timer == &m_cancelTimer); 770 ASSERT_UNUSED(timer, timer == &m_cancelTimer);
771 if (!hasClientsOrObservers() && m_loader) 771 if (!hasClientsOrObservers() && m_loader)
772 m_loader->cancel(); 772 m_loader->cancel();
773 } 773 }
774 774
775 void Resource::setDecodedSize(size_t decodedSize) 775 void Resource::setDecodedSize(size_t decodedSize)
776 { 776 {
777 if (decodedSize == m_decodedSize) 777 if (decodedSize == m_decodedSize)
778 return; 778 return;
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 case Resource::TextTrack: 1101 case Resource::TextTrack:
1102 case Resource::Media: 1102 case Resource::Media:
1103 case Resource::Manifest: 1103 case Resource::Manifest:
1104 return false; 1104 return false;
1105 } 1105 }
1106 ASSERT_NOT_REACHED(); 1106 ASSERT_NOT_REACHED();
1107 return false; 1107 return false;
1108 } 1108 }
1109 1109
1110 } // namespace blink 1110 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698