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 30 matching lines...) Expand all Loading... |
41 #include "InspectorState.h" | 41 #include "InspectorState.h" |
42 #include "InspectorValues.h" | 42 #include "InspectorValues.h" |
43 #include "InstrumentingAgents.h" | 43 #include "InstrumentingAgents.h" |
44 #include "Page.h" | 44 #include "Page.h" |
45 #include "PageGroup.h" | 45 #include "PageGroup.h" |
46 #include "SecurityOrigin.h" | 46 #include "SecurityOrigin.h" |
47 #include "Storage.h" | 47 #include "Storage.h" |
48 #include "StorageArea.h" | 48 #include "StorageArea.h" |
49 #include "StorageNamespace.h" | 49 #include "StorageNamespace.h" |
50 #include "VoidCallback.h" | 50 #include "VoidCallback.h" |
51 #include "WebCoreMemoryInstrumentation.h" | |
52 | 51 |
53 #include <wtf/MemoryInstrumentationHashMap.h> | |
54 #include <wtf/Vector.h> | 52 #include <wtf/Vector.h> |
55 | 53 |
56 namespace WebCore { | 54 namespace WebCore { |
57 | 55 |
58 namespace DOMStorageAgentState { | 56 namespace DOMStorageAgentState { |
59 static const char domStorageAgentEnabled[] = "domStorageAgentEnabled"; | 57 static const char domStorageAgentEnabled[] = "domStorageAgentEnabled"; |
60 }; | 58 }; |
61 | 59 |
62 static bool hadException(ExceptionCode ec, ErrorString* errorString) | 60 static bool hadException(ExceptionCode ec, ErrorString* errorString) |
63 { | 61 { |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 return 0; | 229 return 0; |
232 } | 230 } |
233 targetFrame = frame; | 231 targetFrame = frame; |
234 | 232 |
235 Page* page = m_pageAgent->page(); | 233 Page* page = m_pageAgent->page(); |
236 if (isLocalStorage) | 234 if (isLocalStorage) |
237 return page->group().localStorage()->storageArea(frame->document()->secu
rityOrigin()); | 235 return page->group().localStorage()->storageArea(frame->document()->secu
rityOrigin()); |
238 return page->sessionStorage()->storageArea(frame->document()->securityOrigin
()); | 236 return page->sessionStorage()->storageArea(frame->document()->securityOrigin
()); |
239 } | 237 } |
240 | 238 |
241 void InspectorDOMStorageAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectI
nfo) const | |
242 { | |
243 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorDO
MStorageAgent); | |
244 InspectorBaseAgent<InspectorDOMStorageAgent>::reportMemoryUsage(memoryObject
Info); | |
245 info.addWeakPointer(m_frontend); | |
246 } | |
247 | |
248 } // namespace WebCore | 239 } // namespace WebCore |
249 | 240 |
OLD | NEW |