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

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

Issue 198673002: Rename DatabaseTaskSynchronizer to TaskSynchronizer and move it to platform/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 { 47 {
48 } 48 }
49 49
50 void DatabaseBackend::trace(Visitor* visitor) 50 void DatabaseBackend::trace(Visitor* visitor)
51 { 51 {
52 DatabaseBackendBase::trace(visitor); 52 DatabaseBackendBase::trace(visitor);
53 } 53 }
54 54
55 bool DatabaseBackend::openAndVerifyVersion(bool setVersionInNewDatabase, Databas eError& error, String& errorMessage) 55 bool DatabaseBackend::openAndVerifyVersion(bool setVersionInNewDatabase, Databas eError& error, String& errorMessage)
56 { 56 {
57 DatabaseTaskSynchronizer synchronizer; 57 TaskSynchronizer synchronizer;
58 if (!databaseContext()->databaseThread() || databaseContext()->databaseThrea d()->terminationRequested(&synchronizer)) 58 if (!databaseContext()->databaseThread() || databaseContext()->databaseThrea d()->terminationRequested(&synchronizer))
59 return false; 59 return false;
60 60
61 DatabaseTracker::tracker().prepareToOpenDatabase(this); 61 DatabaseTracker::tracker().prepareToOpenDatabase(this);
62 bool success = false; 62 bool success = false;
63 OwnPtr<DatabaseOpenTask> task = DatabaseOpenTask::create(this, setVersionInN ewDatabase, &synchronizer, error, errorMessage, success); 63 OwnPtr<DatabaseOpenTask> task = DatabaseOpenTask::create(this, setVersionInN ewDatabase, &synchronizer, error, errorMessage, success);
64 databaseContext()->databaseThread()->scheduleTask(task.release()); 64 databaseContext()->databaseThread()->scheduleTask(task.release());
65 synchronizer.waitForTaskCompletion(); 65 synchronizer.waitForTaskCompletion();
66 66
67 return success; 67 return success;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 { 161 {
162 return databaseContext()->databaseThread()->transactionClient(); 162 return databaseContext()->databaseThread()->transactionClient();
163 } 163 }
164 164
165 SQLTransactionCoordinator* DatabaseBackend::transactionCoordinator() const 165 SQLTransactionCoordinator* DatabaseBackend::transactionCoordinator() const
166 { 166 {
167 return databaseContext()->databaseThread()->transactionCoordinator(); 167 return databaseContext()->databaseThread()->transactionCoordinator();
168 } 168 }
169 169
170 } // namespace WebCore 170 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698