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

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

Issue 2377253002: Add explicit to core/fetch, core/loader and modules/websockets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 2 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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 static const int progressItemDefaultEstimatedLength = 1024 * 1024; 50 static const int progressItemDefaultEstimatedLength = 1024 * 1024;
51 51
52 static const double progressNotificationInterval = 0.02; 52 static const double progressNotificationInterval = 0.02;
53 static const double progressNotificationTimeInterval = 0.1; 53 static const double progressNotificationTimeInterval = 0.1;
54 54
55 struct ProgressItem { 55 struct ProgressItem {
56 WTF_MAKE_NONCOPYABLE(ProgressItem); 56 WTF_MAKE_NONCOPYABLE(ProgressItem);
57 USING_FAST_MALLOC(ProgressItem); 57 USING_FAST_MALLOC(ProgressItem);
58 public: 58 public:
59 ProgressItem(long long length) 59 explicit ProgressItem(long long length)
60 : bytesReceived(0) 60 : bytesReceived(0)
61 , estimatedLength(length) { } 61 , estimatedLength(length) { }
62 62
63 long long bytesReceived; 63 long long bytesReceived;
64 long long estimatedLength; 64 long long estimatedLength;
65 }; 65 };
66 66
67 ProgressTracker* ProgressTracker::create(LocalFrame* frame) 67 ProgressTracker* ProgressTracker::create(LocalFrame* frame)
68 { 68 {
69 return new ProgressTracker(frame); 69 return new ProgressTracker(frame);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 { 231 {
232 ProgressItem* item = m_progressItems.get(identifier); 232 ProgressItem* item = m_progressItems.get(identifier);
233 if (!item) 233 if (!item)
234 return; 234 return;
235 235
236 item->estimatedLength = item->bytesReceived; 236 item->estimatedLength = item->bytesReceived;
237 maybeSendProgress(); 237 maybeSendProgress();
238 } 238 }
239 239
240 } // namespace blink 240 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698