OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 case SecurityError: | 58 case SecurityError: |
59 *errorString = "Security error"; | 59 *errorString = "Security error"; |
60 return true; | 60 return true; |
61 default: | 61 default: |
62 *errorString = "Unknown DOM storage error"; | 62 *errorString = "Unknown DOM storage error"; |
63 return true; | 63 return true; |
64 } | 64 } |
65 } | 65 } |
66 | 66 |
67 InspectorDOMStorageAgent::InspectorDOMStorageAgent(Page* page) | 67 InspectorDOMStorageAgent::InspectorDOMStorageAgent(Page* page) |
68 : InspectorBaseAgent<InspectorDOMStorageAgent, protocol::DOMStorage::Fronten
d>("DOMStorage") | 68 : m_page(page) |
69 , m_page(page) | |
70 , m_isEnabled(false) | 69 , m_isEnabled(false) |
71 { | 70 { |
72 } | 71 } |
73 | 72 |
74 InspectorDOMStorageAgent::~InspectorDOMStorageAgent() | 73 InspectorDOMStorageAgent::~InspectorDOMStorageAgent() |
75 { | 74 { |
76 } | 75 } |
77 | 76 |
78 DEFINE_TRACE(InspectorDOMStorageAgent) | 77 DEFINE_TRACE(InspectorDOMStorageAgent) |
79 { | 78 { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 StorageNamespace* sessionStorage = StorageNamespaceController::from(m_page)-
>sessionStorage(); | 212 StorageNamespace* sessionStorage = StorageNamespaceController::from(m_page)-
>sessionStorage(); |
214 if (!sessionStorage) { | 213 if (!sessionStorage) { |
215 if (errorString) | 214 if (errorString) |
216 *errorString = "SessionStorage is not supported"; | 215 *errorString = "SessionStorage is not supported"; |
217 return nullptr; | 216 return nullptr; |
218 } | 217 } |
219 return sessionStorage->storageArea(frame->document()->getSecurityOrigin()); | 218 return sessionStorage->storageArea(frame->document()->getSecurityOrigin()); |
220 } | 219 } |
221 | 220 |
222 } // namespace blink | 221 } // namespace blink |
OLD | NEW |