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

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

Issue 20300002: Fix trailing whitespace in .cpp, .h, and .idl files (ex. Source/core) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/webdatabase/Database.cpp ('k') | Source/modules/webdatabase/DatabaseBackend.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 337
338 int DatabaseAuthorizer::allowTransaction() 338 int DatabaseAuthorizer::allowTransaction()
339 { 339 {
340 return m_securityEnabled ? SQLAuthDeny : SQLAuthAllow; 340 return m_securityEnabled ? SQLAuthDeny : SQLAuthAllow;
341 } 341 }
342 342
343 int DatabaseAuthorizer::allowRead(const String& tableName, const String&) 343 int DatabaseAuthorizer::allowRead(const String& tableName, const String&)
344 { 344 {
345 if (m_permissions & NoAccessMask && m_securityEnabled) 345 if (m_permissions & NoAccessMask && m_securityEnabled)
346 return SQLAuthDeny; 346 return SQLAuthDeny;
347 347
348 return denyBasedOnTableName(tableName); 348 return denyBasedOnTableName(tableName);
349 } 349 }
350 350
351 int DatabaseAuthorizer::allowReindex(const String&) 351 int DatabaseAuthorizer::allowReindex(const String&)
352 { 352 {
353 return (!allowWrite() ? SQLAuthDeny : SQLAuthAllow); 353 return (!allowWrite() ? SQLAuthDeny : SQLAuthAllow);
354 } 354 }
355 355
356 int DatabaseAuthorizer::allowAnalyze(const String& tableName) 356 int DatabaseAuthorizer::allowAnalyze(const String& tableName)
357 { 357 {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 bool DatabaseAuthorizer::allowWrite() 394 bool DatabaseAuthorizer::allowWrite()
395 { 395 {
396 return !(m_securityEnabled && (m_permissions & ReadOnlyMask || m_permissions & NoAccessMask)); 396 return !(m_securityEnabled && (m_permissions & ReadOnlyMask || m_permissions & NoAccessMask));
397 } 397 }
398 398
399 void DatabaseAuthorizer::setReadOnly() 399 void DatabaseAuthorizer::setReadOnly()
400 { 400 {
401 m_permissions |= ReadOnlyMask; 401 m_permissions |= ReadOnlyMask;
402 } 402 }
403 403
404 void DatabaseAuthorizer::setPermissions(int permissions) 404 void DatabaseAuthorizer::setPermissions(int permissions)
405 { 405 {
406 m_permissions = permissions; 406 m_permissions = permissions;
407 } 407 }
408 408
409 int DatabaseAuthorizer::denyBasedOnTableName(const String& tableName) const 409 int DatabaseAuthorizer::denyBasedOnTableName(const String& tableName) const
410 { 410 {
411 if (!m_securityEnabled) 411 if (!m_securityEnabled)
412 return SQLAuthAllow; 412 return SQLAuthAllow;
413 413
(...skipping 11 matching lines...) Expand all
425 425
426 int DatabaseAuthorizer::updateDeletesBasedOnTableName(const String& tableName) 426 int DatabaseAuthorizer::updateDeletesBasedOnTableName(const String& tableName)
427 { 427 {
428 int allow = denyBasedOnTableName(tableName); 428 int allow = denyBasedOnTableName(tableName);
429 if (allow) 429 if (allow)
430 m_hadDeletes = true; 430 m_hadDeletes = true;
431 return allow; 431 return allow;
432 } 432 }
433 433
434 } // namespace WebCore 434 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/webdatabase/Database.cpp ('k') | Source/modules/webdatabase/DatabaseBackend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698