| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 const char* NavigatorStorageQuota::supplementName() | 47 const char* NavigatorStorageQuota::supplementName() |
| 48 { | 48 { |
| 49 return "NavigatorStorageQuota"; | 49 return "NavigatorStorageQuota"; |
| 50 } | 50 } |
| 51 | 51 |
| 52 NavigatorStorageQuota& NavigatorStorageQuota::from(Navigator& navigator) | 52 NavigatorStorageQuota& NavigatorStorageQuota::from(Navigator& navigator) |
| 53 { | 53 { |
| 54 NavigatorStorageQuota* supplement = static_cast<NavigatorStorageQuota*>(Will
BeHeapSupplement<Navigator>::from(navigator, supplementName())); | 54 NavigatorStorageQuota* supplement = static_cast<NavigatorStorageQuota*>(Will
BeHeapSupplement<Navigator>::from(navigator, supplementName())); |
| 55 if (!supplement) { | 55 if (!supplement) { |
| 56 supplement = new NavigatorStorageQuota(navigator.frame()); | 56 supplement = new NavigatorStorageQuota(navigator.localFrame()); |
| 57 provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement)); | 57 provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement)); |
| 58 } | 58 } |
| 59 return *supplement; | 59 return *supplement; |
| 60 } | 60 } |
| 61 | 61 |
| 62 StorageQuota* NavigatorStorageQuota::storageQuota(Navigator& navigator) | 62 StorageQuota* NavigatorStorageQuota::storageQuota(Navigator& navigator) |
| 63 { | 63 { |
| 64 return NavigatorStorageQuota::from(navigator).storageQuota(); | 64 return NavigatorStorageQuota::from(navigator).storageQuota(); |
| 65 } | 65 } |
| 66 | 66 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void NavigatorStorageQuota::trace(Visitor* visitor) | 98 void NavigatorStorageQuota::trace(Visitor* visitor) |
| 99 { | 99 { |
| 100 visitor->trace(m_storageQuota); | 100 visitor->trace(m_storageQuota); |
| 101 visitor->trace(m_temporaryStorage); | 101 visitor->trace(m_temporaryStorage); |
| 102 visitor->trace(m_persistentStorage); | 102 visitor->trace(m_persistentStorage); |
| 103 WillBeHeapSupplement<Navigator>::trace(visitor); | 103 WillBeHeapSupplement<Navigator>::trace(visitor); |
| 104 DOMWindowProperty::trace(visitor); | 104 DOMWindowProperty::trace(visitor); |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace blink | 107 } // namespace blink |
| OLD | NEW |