OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 DatabaseAuthorizer* DatabaseAuthorizer::create(const String& databaseInfoTableNa
me) | 33 DatabaseAuthorizer* DatabaseAuthorizer::create(const String& databaseInfoTableNa
me) |
34 { | 34 { |
35 return new DatabaseAuthorizer(databaseInfoTableName); | 35 return new DatabaseAuthorizer(databaseInfoTableName); |
36 } | 36 } |
37 | 37 |
38 DatabaseAuthorizer::DatabaseAuthorizer(const String& databaseInfoTableName) | 38 DatabaseAuthorizer::DatabaseAuthorizer(const String& databaseInfoTableName) |
39 : m_securityEnabled(false) | 39 : m_securityEnabled(false) |
40 , m_databaseInfoTableName(databaseInfoTableName) | 40 , m_databaseInfoTableName(databaseInfoTableName) |
41 { | 41 { |
| 42 DCHECK(isMainThread()); |
| 43 |
42 reset(); | 44 reset(); |
43 addWhitelistedFunctions(); | 45 addWhitelistedFunctions(); |
44 } | 46 } |
45 | 47 |
46 void DatabaseAuthorizer::reset() | 48 void DatabaseAuthorizer::reset() |
47 { | 49 { |
48 m_lastActionWasInsert = false; | 50 m_lastActionWasInsert = false; |
49 m_lastActionChangedDatabase = false; | 51 m_lastActionChangedDatabase = false; |
50 m_permissions = ReadWriteMask; | 52 m_permissions = ReadWriteMask; |
51 } | 53 } |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 | 418 |
417 int DatabaseAuthorizer::updateDeletesBasedOnTableName(const String& tableName) | 419 int DatabaseAuthorizer::updateDeletesBasedOnTableName(const String& tableName) |
418 { | 420 { |
419 int allow = denyBasedOnTableName(tableName); | 421 int allow = denyBasedOnTableName(tableName); |
420 if (allow) | 422 if (allow) |
421 m_hadDeletes = true; | 423 m_hadDeletes = true; |
422 return allow; | 424 return allow; |
423 } | 425 } |
424 | 426 |
425 } // namespace blink | 427 } // namespace blink |
OLD | NEW |