OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2009 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 StorageNamespace::StorageNamespace(PassOwnPtr<WebStorageNamespace> webStorageNam
espace) | 38 StorageNamespace::StorageNamespace(PassOwnPtr<WebStorageNamespace> webStorageNam
espace) |
39 : m_webStorageNamespace(webStorageNamespace) | 39 : m_webStorageNamespace(webStorageNamespace) |
40 { | 40 { |
41 } | 41 } |
42 | 42 |
43 StorageNamespace::~StorageNamespace() | 43 StorageNamespace::~StorageNamespace() |
44 { | 44 { |
45 } | 45 } |
46 | 46 |
47 PassOwnPtrWillBeRawPtr<StorageArea> StorageNamespace::localStorageArea(SecurityO
rigin* origin) | 47 StorageArea* StorageNamespace::localStorageArea(SecurityOrigin* origin) |
48 { | 48 { |
49 ASSERT(isMainThread()); | 49 ASSERT(isMainThread()); |
50 static WebStorageNamespace* localStorageNamespace = nullptr; | 50 static WebStorageNamespace* localStorageNamespace = nullptr; |
51 if (!localStorageNamespace) | 51 if (!localStorageNamespace) |
52 localStorageNamespace = Platform::current()->createLocalStorageNamespace
(); | 52 localStorageNamespace = Platform::current()->createLocalStorageNamespace
(); |
53 return StorageArea::create(adoptPtr(localStorageNamespace->createStorageArea
(origin->toString())), LocalStorage); | 53 return StorageArea::create(adoptPtr(localStorageNamespace->createStorageArea
(origin->toString())), LocalStorage); |
54 } | 54 } |
55 | 55 |
56 PassOwnPtrWillBeRawPtr<StorageArea> StorageNamespace::storageArea(SecurityOrigin
* origin) | 56 StorageArea* StorageNamespace::storageArea(SecurityOrigin* origin) |
57 { | 57 { |
58 return StorageArea::create(adoptPtr(m_webStorageNamespace->createStorageArea
(origin->toString())), SessionStorage); | 58 return StorageArea::create(adoptPtr(m_webStorageNamespace->createStorageArea
(origin->toString())), SessionStorage); |
59 } | 59 } |
60 | 60 |
61 bool StorageNamespace::isSameNamespace(const WebStorageNamespace& sessionNamespa
ce) const | 61 bool StorageNamespace::isSameNamespace(const WebStorageNamespace& sessionNamespa
ce) const |
62 { | 62 { |
63 return m_webStorageNamespace && m_webStorageNamespace->isSameNamespace(sessi
onNamespace); | 63 return m_webStorageNamespace && m_webStorageNamespace->isSameNamespace(sessi
onNamespace); |
64 } | 64 } |
65 | 65 |
66 } // namespace blink | 66 } // namespace blink |
OLD | NEW |