| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 databaseModified(WebSecurityOrigin::createFromString(originString), | 58 databaseModified(WebSecurityOrigin::createFromString(originString), |
| 59 databaseName); | 59 databaseName); |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace | 62 } // namespace |
| 63 | 63 |
| 64 void SQLTransactionClient::didCommitWriteTransaction(Database* database) { | 64 void SQLTransactionClient::didCommitWriteTransaction(Database* database) { |
| 65 String databaseName = database->stringIdentifier(); | 65 String databaseName = database->stringIdentifier(); |
| 66 ExecutionContext* executionContext = | 66 ExecutionContext* executionContext = |
| 67 database->getDatabaseContext()->getExecutionContext(); | 67 database->getDatabaseContext()->getExecutionContext(); |
| 68 SecurityOrigin* origin = database->getSecurityOrigin(); |
| 68 if (!executionContext->isContextThread()) { | 69 if (!executionContext->isContextThread()) { |
| 69 executionContext->postTask( | 70 executionContext->postTask( |
| 70 TaskType::DatabaseAccess, BLINK_FROM_HERE, | 71 TaskType::DatabaseAccess, BLINK_FROM_HERE, |
| 71 createCrossThreadTask( | 72 createCrossThreadTask(&databaseModifiedCrossThread, |
| 72 &databaseModifiedCrossThread, | 73 origin->toRawString(), databaseName)); |
| 73 executionContext->getSecurityOrigin()->toRawString(), | |
| 74 databaseName)); | |
| 75 } else { | 74 } else { |
| 76 databaseModified(WebSecurityOrigin(executionContext->getSecurityOrigin()), | 75 databaseModified(WebSecurityOrigin(origin), databaseName); |
| 77 databaseName); | |
| 78 } | 76 } |
| 79 } | 77 } |
| 80 | 78 |
| 81 bool SQLTransactionClient::didExceedQuota(Database* database) { | 79 bool SQLTransactionClient::didExceedQuota(Database* database) { |
| 82 // Chromium does not allow users to manually change the quota for an origin | 80 // Chromium does not allow users to manually change the quota for an origin |
| 83 // (for now, at least). Don't do anything. | 81 // (for now, at least). Don't do anything. |
| 84 ASSERT( | 82 ASSERT( |
| 85 database->getDatabaseContext()->getExecutionContext()->isContextThread()); | 83 database->getDatabaseContext()->getExecutionContext()->isContextThread()); |
| 86 return false; | 84 return false; |
| 87 } | 85 } |
| 88 | 86 |
| 89 } // namespace blink | 87 } // namespace blink |
| OLD | NEW |