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

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

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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) 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 22 matching lines...) Expand all
33 33
34 DatabaseAuthorizer* DatabaseAuthorizer::create(const String& databaseInfoTableNa me) 34 DatabaseAuthorizer* DatabaseAuthorizer::create(const String& databaseInfoTableNa me)
35 { 35 {
36 return new DatabaseAuthorizer(databaseInfoTableName); 36 return new DatabaseAuthorizer(databaseInfoTableName);
37 } 37 }
38 38
39 DatabaseAuthorizer::DatabaseAuthorizer(const String& databaseInfoTableName) 39 DatabaseAuthorizer::DatabaseAuthorizer(const String& databaseInfoTableName)
40 : m_securityEnabled(false) 40 : m_securityEnabled(false)
41 , m_databaseInfoTableName(databaseInfoTableName) 41 , m_databaseInfoTableName(databaseInfoTableName)
42 { 42 {
43 ASSERT(isMainThread());
43 reset(); 44 reset();
44 addWhitelistedFunctions(); 45 addWhitelistedFunctions();
45 } 46 }
46 47
47 void DatabaseAuthorizer::reset() 48 void DatabaseAuthorizer::reset()
48 { 49 {
49 m_lastActionWasInsert = false; 50 m_lastActionWasInsert = false;
50 m_lastActionChangedDatabase = false; 51 m_lastActionChangedDatabase = false;
51 m_permissions = ReadWriteMask; 52 m_permissions = ReadWriteMask;
52 } 53 }
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 418
418 int DatabaseAuthorizer::updateDeletesBasedOnTableName(const String& tableName) 419 int DatabaseAuthorizer::updateDeletesBasedOnTableName(const String& tableName)
419 { 420 {
420 int allow = denyBasedOnTableName(tableName); 421 int allow = denyBasedOnTableName(tableName);
421 if (allow) 422 if (allow)
422 m_hadDeletes = true; 423 m_hadDeletes = true;
423 return allow; 424 return allow;
424 } 425 }
425 426
426 } // namespace blink 427 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698