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 | |
44 reset(); | 42 reset(); |
45 addWhitelistedFunctions(); | 43 addWhitelistedFunctions(); |
46 } | 44 } |
47 | 45 |
48 void DatabaseAuthorizer::reset() | 46 void DatabaseAuthorizer::reset() |
49 { | 47 { |
50 m_lastActionWasInsert = false; | 48 m_lastActionWasInsert = false; |
51 m_lastActionChangedDatabase = false; | 49 m_lastActionChangedDatabase = false; |
52 m_permissions = ReadWriteMask; | 50 m_permissions = ReadWriteMask; |
53 } | 51 } |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 | 416 |
419 int DatabaseAuthorizer::updateDeletesBasedOnTableName(const String& tableName) | 417 int DatabaseAuthorizer::updateDeletesBasedOnTableName(const String& tableName) |
420 { | 418 { |
421 int allow = denyBasedOnTableName(tableName); | 419 int allow = denyBasedOnTableName(tableName); |
422 if (allow) | 420 if (allow) |
423 m_hadDeletes = true; | 421 m_hadDeletes = true; |
424 return allow; | 422 return allow; |
425 } | 423 } |
426 | 424 |
427 } // namespace blink | 425 } // namespace blink |
OLD | NEW |