OLD | NEW |
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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 estimated_size_(estimated_size), | 232 estimated_size_(estimated_size), |
233 guid_(0), | 233 guid_(0), |
234 opened_(0), | 234 opened_(0), |
235 new_(false), | 235 new_(false), |
236 transaction_in_progress_(false), | 236 transaction_in_progress_(false), |
237 is_transaction_queue_enabled_(true) { | 237 is_transaction_queue_enabled_(true) { |
238 DCHECK(IsMainThread()); | 238 DCHECK(IsMainThread()); |
239 context_thread_security_origin_ = | 239 context_thread_security_origin_ = |
240 database_context_->GetSecurityOrigin()->IsolatedCopy(); | 240 database_context_->GetSecurityOrigin()->IsolatedCopy(); |
241 | 241 |
242 database_authorizer_ = DatabaseAuthorizer::Create(kInfoTableName); | 242 database_authorizer_ = |
| 243 DatabaseAuthorizer::Create(database_context, kInfoTableName); |
243 | 244 |
244 if (name_.IsNull()) | 245 if (name_.IsNull()) |
245 name_ = ""; | 246 name_ = ""; |
246 | 247 |
247 { | 248 { |
248 MutexLocker locker(GuidMutex()); | 249 MutexLocker locker(GuidMutex()); |
249 guid_ = GuidForOriginAndName(GetSecurityOrigin()->ToString(), name); | 250 guid_ = GuidForOriginAndName(GetSecurityOrigin()->ToString(), name); |
250 GuidCount().insert(guid_); | 251 GuidCount().insert(guid_); |
251 } | 252 } |
252 | 253 |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 | 963 |
963 bool Database::Opened() { | 964 bool Database::Opened() { |
964 return static_cast<bool>(AcquireLoad(&opened_)); | 965 return static_cast<bool>(AcquireLoad(&opened_)); |
965 } | 966 } |
966 | 967 |
967 WebTaskRunner* Database::GetDatabaseTaskRunner() const { | 968 WebTaskRunner* Database::GetDatabaseTaskRunner() const { |
968 return database_task_runner_.Get(); | 969 return database_task_runner_.Get(); |
969 } | 970 } |
970 | 971 |
971 } // namespace blink | 972 } // namespace blink |
OLD | NEW |