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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 this, callback, successCallback, errorCallback, readOnly); 867 this, callback, successCallback, errorCallback, readOnly);
868 SQLTransactionBackend* transactionBackend = 868 SQLTransactionBackend* transactionBackend =
869 runTransaction(transaction, readOnly, changeVersionData); 869 runTransaction(transaction, readOnly, changeVersionData);
870 if (!transactionBackend) { 870 if (!transactionBackend) {
871 SQLTransactionErrorCallback* callback = transaction->releaseErrorCallback(); 871 SQLTransactionErrorCallback* callback = transaction->releaseErrorCallback();
872 ASSERT(callback == originalErrorCallback); 872 ASSERT(callback == originalErrorCallback);
873 if (callback) { 873 if (callback) {
874 std::unique_ptr<SQLErrorData> error = SQLErrorData::create( 874 std::unique_ptr<SQLErrorData> error = SQLErrorData::create(
875 SQLError::kUnknownErr, "database has been closed"); 875 SQLError::kUnknownErr, "database has been closed");
876 TaskRunnerHelper::get(TaskType::DatabaseAccess, getExecutionContext()) 876 TaskRunnerHelper::get(TaskType::DatabaseAccess, getExecutionContext())
877 ->postTask(BLINK_FROM_HERE, WTF::bind(&callTransactionErrorCallback, 877 ->postTask(
878 wrapPersistent(callback), 878 BLINK_FROM_HERE,
879 WTF::passed(std::move(error)))); 879 WTF::bind(&callTransactionErrorCallback, wrapPersistent(callback),
880 WTF::passed(std::move(error))));
880 } 881 }
881 } 882 }
882 } 883 }
883 884
884 void Database::scheduleTransactionCallback(SQLTransaction* transaction) { 885 void Database::scheduleTransactionCallback(SQLTransaction* transaction) {
885 // The task is constructed in a database thread, and destructed in the 886 // The task is constructed in a database thread, and destructed in the
886 // context thread. 887 // context thread.
887 getExecutionContext()->postTask( 888 getExecutionContext()->postTask(
888 TaskType::DatabaseAccess, BLINK_FROM_HERE, 889 TaskType::DatabaseAccess, BLINK_FROM_HERE,
889 createCrossThreadTask(&SQLTransaction::performPendingCallback, 890 createCrossThreadTask(&SQLTransaction::performPendingCallback,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 if (getDatabaseContext()->databaseThread()->isDatabaseThread()) 946 if (getDatabaseContext()->databaseThread()->isDatabaseThread())
946 return m_databaseThreadSecurityOrigin.get(); 947 return m_databaseThreadSecurityOrigin.get();
947 return nullptr; 948 return nullptr;
948 } 949 }
949 950
950 bool Database::opened() { 951 bool Database::opened() {
951 return static_cast<bool>(acquireLoad(&m_opened)); 952 return static_cast<bool>(acquireLoad(&m_opened));
952 } 953 }
953 954
954 } // namespace blink 955 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698