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

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

Issue 2324033004: Fix "More than one command on the same line" presubmit errors: core/fetch,loader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: decreasePreloadCount() Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Always start progress at initialProgressValue. This helps provide feedback as 46 // Always start progress at initialProgressValue. This helps provide feedback as
47 // soon as a load starts. 47 // soon as a load starts.
48 static const double initialProgressValue = 0.1; 48 static const double initialProgressValue = 0.1;
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); USING_FAST_MALLOC(ProgressItem); 56 WTF_MAKE_NONCOPYABLE(ProgressItem);
57 USING_FAST_MALLOC(ProgressItem);
57 public: 58 public:
58 ProgressItem(long long length) 59 ProgressItem(long long length)
59 : bytesReceived(0) 60 : bytesReceived(0)
60 , estimatedLength(length) { } 61 , estimatedLength(length) { }
61 62
62 long long bytesReceived; 63 long long bytesReceived;
63 long long estimatedLength; 64 long long estimatedLength;
64 }; 65 };
65 66
66 ProgressTracker* ProgressTracker::create(LocalFrame* frame) 67 ProgressTracker* ProgressTracker::create(LocalFrame* frame)
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 { 231 {
231 ProgressItem* item = m_progressItems.get(identifier); 232 ProgressItem* item = m_progressItems.get(identifier);
232 if (!item) 233 if (!item)
233 return; 234 return;
234 235
235 item->estimatedLength = item->bytesReceived; 236 item->estimatedLength = item->bytesReceived;
236 maybeSendProgress(); 237 maybeSendProgress();
237 } 238 }
238 239
239 } // namespace blink 240 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698