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

Side by Side Diff: third_party/WebKit/Source/modules/quota/NavigatorStorageQuota.cpp

Issue 1846913009: HeapSupplements are now just Supplements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 { 46 {
47 } 47 }
48 48
49 const char* NavigatorStorageQuota::supplementName() 49 const char* NavigatorStorageQuota::supplementName()
50 { 50 {
51 return "NavigatorStorageQuota"; 51 return "NavigatorStorageQuota";
52 } 52 }
53 53
54 NavigatorStorageQuota& NavigatorStorageQuota::from(Navigator& navigator) 54 NavigatorStorageQuota& NavigatorStorageQuota::from(Navigator& navigator)
55 { 55 {
56 NavigatorStorageQuota* supplement = static_cast<NavigatorStorageQuota*>(Heap Supplement<Navigator>::from(navigator, supplementName())); 56 NavigatorStorageQuota* supplement = static_cast<NavigatorStorageQuota*>(Supp lement<Navigator>::from(navigator, supplementName()));
57 if (!supplement) { 57 if (!supplement) {
58 supplement = new NavigatorStorageQuota(navigator.frame()); 58 supplement = new NavigatorStorageQuota(navigator.frame());
59 provideTo(navigator, supplementName(), supplement); 59 provideTo(navigator, supplementName(), supplement);
60 } 60 }
61 return *supplement; 61 return *supplement;
62 } 62 }
63 63
64 StorageQuota* NavigatorStorageQuota::storageQuota(Navigator& navigator) 64 StorageQuota* NavigatorStorageQuota::storageQuota(Navigator& navigator)
65 { 65 {
66 return NavigatorStorageQuota::from(navigator).storageQuota(); 66 return NavigatorStorageQuota::from(navigator).storageQuota();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 m_storageManager = new StorageManager(); 108 m_storageManager = new StorageManager();
109 return m_storageManager.get(); 109 return m_storageManager.get();
110 } 110 }
111 111
112 DEFINE_TRACE(NavigatorStorageQuota) 112 DEFINE_TRACE(NavigatorStorageQuota)
113 { 113 {
114 visitor->trace(m_storageQuota); 114 visitor->trace(m_storageQuota);
115 visitor->trace(m_temporaryStorage); 115 visitor->trace(m_temporaryStorage);
116 visitor->trace(m_persistentStorage); 116 visitor->trace(m_persistentStorage);
117 visitor->trace(m_storageManager); 117 visitor->trace(m_storageManager);
118 HeapSupplement<Navigator>::trace(visitor); 118 Supplement<Navigator>::trace(visitor);
119 DOMWindowProperty::trace(visitor); 119 DOMWindowProperty::trace(visitor);
120 } 120 }
121 121
122 } // namespace blink 122 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698