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 3 // found in the LICENSE file. 4 5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_SCHEDULER_TYPES_H_ 6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_SCHEDULER_TYPES_H_ 7 8 #include <stdint.h> 9 10 namespace content { 11 12 using CacheStorageSchedulerId = int64_t; 13 14 // Define the types of clients that might own a scheduler. This enum is used 15 // to populate histogram names and must be kept in sync with the function 16 // in cache_storage_histogram_utils.cc. Please keep this list sorted. It is 17 // ok to renumber the enumeration since it is converted to a string and not 18 // directly recorded in the histogram. 19 enum class CacheStorageSchedulerClient { 20 kBackgroundSync = 0, 21 kCache = 1, 22 kStorage = 2, 23 }; 24 25 enum class CacheStorageSchedulerMode { 26 kExclusive, 27 kShared, 28 }; 29 30 // Define the different types of operations that can be scheduled. This enum 31 // is used to populate histogram names and must be kept in sync with the 32 // function in cache_storage_histogram_utils.cc. Please keep this list sorted. 33 // It is ok to renumber the enumeration since it is converted to a string and 34 // not directly recorded in the histogram. 35 enum class CacheStorageSchedulerOp { 36 kBackgroundSync = 0, 37 kClose = 1, 38 kDelete = 2, 39 kGetAllMatched = 3, 40 kHas = 4, 41 kInit = 5, 42 kKeys = 6, 43 kMatch = 7, 44 kMatchAll = 8, 45 kOpen = 9, 46 kPut = 10, 47 kSize = 11, 48 kSizeThenClose = 12, 49 kTest = 13, 50 kWriteIndex = 14, 51 kWriteSideData = 15, 52 }; 53 54 enum class CacheStorageSchedulerPriority { 55 kNormal = 0, 56 kHigh = 1, 57 }; 58 59 } // namespace content 60 61 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_SCHEDULER_TYPES_H_ 62