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

Side by Side Diff: third_party/WebKit/Source/core/dom/TaskRunnerHelper.h

Issue 2580263002: Remove TaskType::Unspecified (14) (Closed)
Patch Set: rebase Created 3 years, 11 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TaskRunnerHelper_h 5 #ifndef TaskRunnerHelper_h
6 #define TaskRunnerHelper_h 6 #define TaskRunnerHelper_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 #include "wtf/HashTraits.h" 10 #include "wtf/HashTraits.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // may be throttled. 50 // may be throttled.
51 // 51 //
52 // UnspecedLoading type should be used for all tasks associated with 52 // UnspecedLoading type should be used for all tasks associated with
53 // loading page content, UnspecedTimer should be used for all other purposes. 53 // loading page content, UnspecedTimer should be used for all other purposes.
54 UnspecedTimer, 54 UnspecedTimer,
55 UnspecedLoading, 55 UnspecedLoading,
56 56
57 // Tasks that must not be throttled should be posted here, but the usage 57 // Tasks that must not be throttled should be posted here, but the usage
58 // should be very limited. 58 // should be very limited.
59 Unthrottled, 59 Unthrottled,
60
61 // Tasks that any other TaskType is not assigned to. This should be
62 // transitional and should be removed.
63 Unspecified,
64 }; 60 };
65 61
66 // HashTraits for TaskType. 62 // HashTraits for TaskType.
67 struct TaskTypeTraits : WTF::GenericHashTraits<TaskType> { 63 struct TaskTypeTraits : WTF::GenericHashTraits<TaskType> {
68 static const bool emptyValueIsZero = false; 64 static const bool emptyValueIsZero = false;
69 static TaskType emptyValue() { return static_cast<TaskType>(-1); } 65 static TaskType emptyValue() { return static_cast<TaskType>(-1); }
70 static void constructDeletedValue(TaskType& slot, bool) { 66 static void constructDeletedValue(TaskType& slot, bool) {
71 slot = static_cast<TaskType>(-2); 67 slot = static_cast<TaskType>(-2);
72 } 68 }
73 static bool isDeletedValue(TaskType value) { 69 static bool isDeletedValue(TaskType value) {
(...skipping 10 matching lines...) Expand all
84 public: 80 public:
85 static WebTaskRunner* get(TaskType, LocalFrame*); 81 static WebTaskRunner* get(TaskType, LocalFrame*);
86 static WebTaskRunner* get(TaskType, Document*); 82 static WebTaskRunner* get(TaskType, Document*);
87 static WebTaskRunner* get(TaskType, ExecutionContext*); 83 static WebTaskRunner* get(TaskType, ExecutionContext*);
88 static WebTaskRunner* get(TaskType, ScriptState*); 84 static WebTaskRunner* get(TaskType, ScriptState*);
89 }; 85 };
90 86
91 } // namespace blink 87 } // namespace blink
92 88
93 #endif 89 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ExecutionContext.cpp ('k') | third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698