| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 { | 39 { |
| 40 } | 40 } |
| 41 | 41 |
| 42 const char* WorkerNavigatorStorageQuota::supplementName() | 42 const char* WorkerNavigatorStorageQuota::supplementName() |
| 43 { | 43 { |
| 44 return "WorkerNavigatorStorageQuota"; | 44 return "WorkerNavigatorStorageQuota"; |
| 45 } | 45 } |
| 46 | 46 |
| 47 WorkerNavigatorStorageQuota& WorkerNavigatorStorageQuota::from(WorkerNavigator&
navigator) | 47 WorkerNavigatorStorageQuota& WorkerNavigatorStorageQuota::from(WorkerNavigator&
navigator) |
| 48 { | 48 { |
| 49 WorkerNavigatorStorageQuota* supplement = static_cast<WorkerNavigatorStorage
Quota*>(HeapSupplement<WorkerNavigator>::from(navigator, supplementName())); | 49 WorkerNavigatorStorageQuota* supplement = static_cast<WorkerNavigatorStorage
Quota*>(Supplement<WorkerNavigator>::from(navigator, supplementName())); |
| 50 if (!supplement) { | 50 if (!supplement) { |
| 51 supplement = new WorkerNavigatorStorageQuota(); | 51 supplement = new WorkerNavigatorStorageQuota(); |
| 52 provideTo(navigator, supplementName(), supplement); | 52 provideTo(navigator, supplementName(), supplement); |
| 53 } | 53 } |
| 54 return *supplement; | 54 return *supplement; |
| 55 } | 55 } |
| 56 | 56 |
| 57 DeprecatedStorageQuota* WorkerNavigatorStorageQuota::webkitTemporaryStorage(Work
erNavigator& navigator) | 57 DeprecatedStorageQuota* WorkerNavigatorStorageQuota::webkitTemporaryStorage(Work
erNavigator& navigator) |
| 58 { | 58 { |
| 59 return WorkerNavigatorStorageQuota::from(navigator).webkitTemporaryStorage()
; | 59 return WorkerNavigatorStorageQuota::from(navigator).webkitTemporaryStorage()
; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 88 if (!m_storageManager) | 88 if (!m_storageManager) |
| 89 m_storageManager = new StorageManager(); | 89 m_storageManager = new StorageManager(); |
| 90 return m_storageManager.get(); | 90 return m_storageManager.get(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 DEFINE_TRACE(WorkerNavigatorStorageQuota) | 93 DEFINE_TRACE(WorkerNavigatorStorageQuota) |
| 94 { | 94 { |
| 95 visitor->trace(m_temporaryStorage); | 95 visitor->trace(m_temporaryStorage); |
| 96 visitor->trace(m_persistentStorage); | 96 visitor->trace(m_persistentStorage); |
| 97 visitor->trace(m_storageManager); | 97 visitor->trace(m_storageManager); |
| 98 HeapSupplement<WorkerNavigator>::trace(visitor); | 98 Supplement<WorkerNavigator>::trace(visitor); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace blink | 101 } // namespace blink |
| OLD | NEW |