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

Side by Side Diff: tools/UrlDataManager.h

Issue 2212493002: Convert SkAutoTUnref<SkData> to sk_sp<SkData>. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « third_party/ktx/ktx.h ('k') | tools/skiaserve/urlhandlers/BreakHandler.cpp » ('j') | 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 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkUrlDataManager_DEFINED 8 #ifndef SkUrlDataManager_DEFINED
9 #define SkUrlDataManager_DEFINED 9 #define SkUrlDataManager_DEFINED
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 /* 27 /*
28 * Adds a data blob to the cache with a particular content type. UrlDataMan ager will hash 28 * Adds a data blob to the cache with a particular content type. UrlDataMan ager will hash
29 * the blob data to ensure uniqueness 29 * the blob data to ensure uniqueness
30 */ 30 */
31 SkString addData(SkData*, const char* contentType); 31 SkString addData(SkData*, const char* contentType);
32 32
33 struct UrlData : public SkRefCnt { 33 struct UrlData : public SkRefCnt {
34 SkString fUrl; 34 SkString fUrl;
35 SkString fContentType; 35 SkString fContentType;
36 SkAutoTUnref<SkData> fData; 36 sk_sp<SkData> fData;
37 }; 37 };
38 38
39 /* 39 /*
40 * returns the UrlData object which should be hosted at 'url' 40 * returns the UrlData object which should be hosted at 'url'
41 */ 41 */
42 UrlData* getDataFromUrl(SkString url) { 42 UrlData* getDataFromUrl(SkString url) {
43 return fUrlLookup.find(url); 43 return fUrlLookup.find(url);
44 } 44 }
45 void reset(); 45 void reset();
46 46
(...skipping 20 matching lines...) Expand all
67 }; 67 };
68 68
69 69
70 SkString fRootUrl; 70 SkString fRootUrl;
71 SkTDynamicHash<UrlData, SkData, LookupTrait> fCache; 71 SkTDynamicHash<UrlData, SkData, LookupTrait> fCache;
72 SkTDynamicHash<UrlData, SkString, ReverseLookupTrait> fUrlLookup; 72 SkTDynamicHash<UrlData, SkString, ReverseLookupTrait> fUrlLookup;
73 uint32_t fDataId; 73 uint32_t fDataId;
74 }; 74 };
75 75
76 #endif 76 #endif
OLDNEW
« no previous file with comments | « third_party/ktx/ktx.h ('k') | tools/skiaserve/urlhandlers/BreakHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698