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

Side by Side Diff: webkit/tools/test_shell/simple_database_system.cc

Issue 6142009: Upating the app, ceee, chrome, ipc, media, and net directories to use the correct lock.h file. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Unified patch updating all references to the new base/synchronization/lock.h Created 9 years, 11 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 | « webkit/tools/test_shell/simple_database_system.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/tools/test_shell/simple_database_system.h" 5 #include "webkit/tools/test_shell/simple_database_system.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 void SimpleDatabaseSystem::SetFullFilePathsForVfsFile( 170 void SimpleDatabaseSystem::SetFullFilePathsForVfsFile(
171 const string16& origin_identifier, 171 const string16& origin_identifier,
172 const string16& database_name) { 172 const string16& database_name) {
173 string16 vfs_file_name = origin_identifier + ASCIIToUTF16("/") + 173 string16 vfs_file_name = origin_identifier + ASCIIToUTF16("/") +
174 database_name + ASCIIToUTF16("#"); 174 database_name + ASCIIToUTF16("#");
175 FilePath file_name = 175 FilePath file_name =
176 DatabaseUtil::GetFullFilePathForVfsFile(db_tracker_, vfs_file_name); 176 DatabaseUtil::GetFullFilePathForVfsFile(db_tracker_, vfs_file_name);
177 177
178 AutoLock file_names_auto_lock(file_names_lock_); 178 base::AutoLock file_names_auto_lock(file_names_lock_);
179 file_names_[vfs_file_name] = file_name; 179 file_names_[vfs_file_name] = file_name;
180 file_names_[vfs_file_name + ASCIIToUTF16("-journal")] = 180 file_names_[vfs_file_name + ASCIIToUTF16("-journal")] =
181 FilePath::FromWStringHack(file_name.ToWStringHack() + 181 FilePath::FromWStringHack(file_name.ToWStringHack() +
182 ASCIIToWide("-journal")); 182 ASCIIToWide("-journal"));
183 } 183 }
184 184
185 FilePath SimpleDatabaseSystem::GetFullFilePathForVfsFile( 185 FilePath SimpleDatabaseSystem::GetFullFilePathForVfsFile(
186 const string16& vfs_file_name) { 186 const string16& vfs_file_name) {
187 if (vfs_file_name.empty()) // temp file, used for vacuuming 187 if (vfs_file_name.empty()) // temp file, used for vacuuming
188 return FilePath(); 188 return FilePath();
189 189
190 AutoLock file_names_auto_lock(file_names_lock_); 190 base::AutoLock file_names_auto_lock(file_names_lock_);
191 DCHECK(file_names_.find(vfs_file_name) != file_names_.end()); 191 DCHECK(file_names_.find(vfs_file_name) != file_names_.end());
192 return file_names_[vfs_file_name]; 192 return file_names_[vfs_file_name];
193 } 193 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/simple_database_system.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698