| OLD | NEW |
| 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 297 |
| 298 blink::Database* database = databaseForId(databaseId); | 298 blink::Database* database = databaseForId(databaseId); |
| 299 if (database) { | 299 if (database) { |
| 300 Vector<String> tableNames = database->tableNames(); | 300 Vector<String> tableNames = database->tableNames(); |
| 301 unsigned length = tableNames.size(); | 301 unsigned length = tableNames.size(); |
| 302 for (unsigned i = 0; i < length; ++i) | 302 for (unsigned i = 0; i < length; ++i) |
| 303 (*names)->addItem(tableNames[i]); | 303 (*names)->addItem(tableNames[i]); |
| 304 } | 304 } |
| 305 } | 305 } |
| 306 | 306 |
| 307 void InspectorDatabaseAgent::executeSQL(ErrorString*, const String& databaseId,
const String& query, std::unique_ptr<ExecuteSQLCallback> prpRequestCallback) | 307 void InspectorDatabaseAgent::executeSQL(const String& databaseId, const String&
query, std::unique_ptr<ExecuteSQLCallback> prpRequestCallback) |
| 308 { | 308 { |
| 309 std::unique_ptr<ExecuteSQLCallback> requestCallback = std::move(prpRequestCa
llback); | 309 std::unique_ptr<ExecuteSQLCallback> requestCallback = std::move(prpRequestCa
llback); |
| 310 | 310 |
| 311 if (!m_enabled) { | 311 if (!m_enabled) { |
| 312 requestCallback->sendFailure("Database agent is not enabled"); | 312 requestCallback->sendFailure("Database agent is not enabled"); |
| 313 return; | 313 return; |
| 314 } | 314 } |
| 315 | 315 |
| 316 blink::Database* database = databaseForId(databaseId); | 316 blink::Database* database = databaseForId(databaseId); |
| 317 if (!database) { | 317 if (!database) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 344 } | 344 } |
| 345 | 345 |
| 346 DEFINE_TRACE(InspectorDatabaseAgent) | 346 DEFINE_TRACE(InspectorDatabaseAgent) |
| 347 { | 347 { |
| 348 visitor->trace(m_page); | 348 visitor->trace(m_page); |
| 349 visitor->trace(m_resources); | 349 visitor->trace(m_resources); |
| 350 InspectorBaseAgent::trace(visitor); | 350 InspectorBaseAgent::trace(visitor); |
| 351 } | 351 } |
| 352 | 352 |
| 353 } // namespace blink | 353 } // namespace blink |
| OLD | NEW |