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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp

Issue 1621923002: [DevTools] Remove InspectorState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 13 matching lines...) Expand all
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "modules/webdatabase/InspectorDatabaseAgent.h" 29 #include "modules/webdatabase/InspectorDatabaseAgent.h"
30 30
31 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 31 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
32 #include "core/frame/LocalFrame.h" 32 #include "core/frame/LocalFrame.h"
33 #include "core/html/VoidCallback.h" 33 #include "core/html/VoidCallback.h"
34 #include "core/inspector/InspectorState.h"
35 #include "core/loader/DocumentLoader.h" 34 #include "core/loader/DocumentLoader.h"
36 #include "core/page/Page.h" 35 #include "core/page/Page.h"
37 #include "modules/webdatabase/Database.h" 36 #include "modules/webdatabase/Database.h"
38 #include "modules/webdatabase/DatabaseClient.h" 37 #include "modules/webdatabase/DatabaseClient.h"
39 #include "modules/webdatabase/InspectorDatabaseResource.h" 38 #include "modules/webdatabase/InspectorDatabaseResource.h"
40 #include "modules/webdatabase/SQLError.h" 39 #include "modules/webdatabase/SQLError.h"
41 #include "modules/webdatabase/SQLResultSet.h" 40 #include "modules/webdatabase/SQLResultSet.h"
42 #include "modules/webdatabase/SQLResultSetRowList.h" 41 #include "modules/webdatabase/SQLResultSetRowList.h"
43 #include "modules/webdatabase/SQLStatementCallback.h" 42 #include "modules/webdatabase/SQLStatementCallback.h"
44 #include "modules/webdatabase/SQLStatementErrorCallback.h" 43 #include "modules/webdatabase/SQLStatementErrorCallback.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 void InspectorDatabaseAgent::disable(ErrorString*) 264 void InspectorDatabaseAgent::disable(ErrorString*)
266 { 265 {
267 if (!m_enabled) 266 if (!m_enabled)
268 return; 267 return;
269 m_enabled = false; 268 m_enabled = false;
270 m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled); 269 m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled);
271 } 270 }
272 271
273 void InspectorDatabaseAgent::restore() 272 void InspectorDatabaseAgent::restore()
274 { 273 {
275 m_enabled = m_state->getBoolean(DatabaseAgentState::databaseAgentEnabled); 274 m_enabled = m_state->booleanProperty(DatabaseAgentState::databaseAgentEnable d, false);
276 } 275 }
277 276
278 void InspectorDatabaseAgent::getDatabaseTableNames(ErrorString* error, const Str ing& databaseId, RefPtr<TypeBuilder::Array<String>>& names) 277 void InspectorDatabaseAgent::getDatabaseTableNames(ErrorString* error, const Str ing& databaseId, RefPtr<TypeBuilder::Array<String>>& names)
279 { 278 {
280 if (!m_enabled) { 279 if (!m_enabled) {
281 *error = "Database agent is not enabled"; 280 *error = "Database agent is not enabled";
282 return; 281 return;
283 } 282 }
284 283
285 names = TypeBuilder::Array<String>::create(); 284 names = TypeBuilder::Array<String>::create();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 331 }
333 332
334 DEFINE_TRACE(InspectorDatabaseAgent) 333 DEFINE_TRACE(InspectorDatabaseAgent)
335 { 334 {
336 visitor->trace(m_page); 335 visitor->trace(m_page);
337 visitor->trace(m_resources); 336 visitor->trace(m_resources);
338 InspectorBaseAgent::trace(visitor); 337 InspectorBaseAgent::trace(visitor);
339 } 338 }
340 339
341 } // namespace blink 340 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698