Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: Source/core/inspector/InspectorDOMStorageAgent.cpp

Issue 304113003: DevTools: Reenable the DOM storage agent on reattach. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/inspector/InspectorDOMStorageAgent.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 { 82 {
83 m_frontend = frontend; 83 m_frontend = frontend;
84 } 84 }
85 85
86 void InspectorDOMStorageAgent::clearFrontend() 86 void InspectorDOMStorageAgent::clearFrontend()
87 { 87 {
88 m_frontend = 0; 88 m_frontend = 0;
89 disable(0); 89 disable(0);
90 } 90 }
91 91
92 void InspectorDOMStorageAgent::restore()
93 {
94 if (isEnabled())
95 enable(0);
96 }
97
92 bool InspectorDOMStorageAgent::isEnabled() const 98 bool InspectorDOMStorageAgent::isEnabled() const
93 { 99 {
94 return m_state->getBoolean(DOMStorageAgentState::domStorageAgentEnabled); 100 return m_state->getBoolean(DOMStorageAgentState::domStorageAgentEnabled);
95 } 101 }
96 102
97 void InspectorDOMStorageAgent::enable(ErrorString*) 103 void InspectorDOMStorageAgent::enable(ErrorString*)
98 { 104 {
99 m_state->setBoolean(DOMStorageAgentState::domStorageAgentEnabled, true); 105 m_state->setBoolean(DOMStorageAgentState::domStorageAgentEnabled, true);
100 m_instrumentingAgents->setInspectorDOMStorageAgent(this); 106 m_instrumentingAgents->setInspectorDOMStorageAgent(this);
101 } 107 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 217 }
212 targetFrame = frame; 218 targetFrame = frame;
213 219
214 if (isLocalStorage) 220 if (isLocalStorage)
215 return StorageNamespace::localStorageArea(frame->document()->securityOri gin()); 221 return StorageNamespace::localStorageArea(frame->document()->securityOri gin());
216 return m_pageAgent->page()->sessionStorage()->storageArea(frame->document()- >securityOrigin()); 222 return m_pageAgent->page()->sessionStorage()->storageArea(frame->document()- >securityOrigin());
217 } 223 }
218 224
219 } // namespace WebCore 225 } // namespace WebCore
220 226
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDOMStorageAgent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698