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 NavigatorStorageQuota& NavigatorStorageQuota::from(Navigator& navigator) { | 46 NavigatorStorageQuota& NavigatorStorageQuota::from(Navigator& navigator) { |
47 NavigatorStorageQuota* supplement = static_cast<NavigatorStorageQuota*>( | 47 NavigatorStorageQuota* supplement = static_cast<NavigatorStorageQuota*>( |
48 Supplement<Navigator>::from(navigator, supplementName())); | 48 Supplement<Navigator>::from(navigator, supplementName())); |
49 if (!supplement) { | 49 if (!supplement) { |
50 supplement = new NavigatorStorageQuota(navigator); | 50 supplement = new NavigatorStorageQuota(navigator); |
51 provideTo(navigator, supplementName(), supplement); | 51 provideTo(navigator, supplementName(), supplement); |
52 } | 52 } |
53 return *supplement; | 53 return *supplement; |
54 } | 54 } |
55 | 55 |
56 | |
57 DeprecatedStorageQuota* NavigatorStorageQuota::webkitTemporaryStorage( | 56 DeprecatedStorageQuota* NavigatorStorageQuota::webkitTemporaryStorage( |
58 Navigator& navigator) { | 57 Navigator& navigator) { |
59 return NavigatorStorageQuota::from(navigator).webkitTemporaryStorage(); | 58 return NavigatorStorageQuota::from(navigator).webkitTemporaryStorage(); |
60 } | 59 } |
61 | 60 |
62 DeprecatedStorageQuota* NavigatorStorageQuota::webkitPersistentStorage( | 61 DeprecatedStorageQuota* NavigatorStorageQuota::webkitPersistentStorage( |
63 Navigator& navigator) { | 62 Navigator& navigator) { |
64 return NavigatorStorageQuota::from(navigator).webkitPersistentStorage(); | 63 return NavigatorStorageQuota::from(navigator).webkitPersistentStorage(); |
65 } | 64 } |
66 | 65 |
(...skipping 22 matching lines...) Expand all Loading... |
89 } | 88 } |
90 | 89 |
91 DEFINE_TRACE(NavigatorStorageQuota) { | 90 DEFINE_TRACE(NavigatorStorageQuota) { |
92 visitor->trace(m_temporaryStorage); | 91 visitor->trace(m_temporaryStorage); |
93 visitor->trace(m_persistentStorage); | 92 visitor->trace(m_persistentStorage); |
94 visitor->trace(m_storageManager); | 93 visitor->trace(m_storageManager); |
95 Supplement<Navigator>::trace(visitor); | 94 Supplement<Navigator>::trace(visitor); |
96 } | 95 } |
97 | 96 |
98 } // namespace blink | 97 } // namespace blink |
OLD | NEW |