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

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

Issue 1909813002: Enable per thread heap for database thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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 21 matching lines...) Expand all
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698