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

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

Issue 1709014: Fix simple_database_system.cc to correctly support temp DB files.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 7 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 | « no previous file | 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 #if defined(USE_SYSTEM_SQLITE) 7 #if defined(USE_SYSTEM_SQLITE)
8 #include <sqlite3.h> 8 #include <sqlite3.h>
9 #else 9 #else
10 #include "third_party/sqlite/preprocessed/sqlite3.h" 10 #include "third_party/sqlite/preprocessed/sqlite3.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 AutoLock file_names_auto_lock(file_names_lock_); 186 AutoLock file_names_auto_lock(file_names_lock_);
187 file_names_[vfs_file_name] = file_name; 187 file_names_[vfs_file_name] = file_name;
188 file_names_[vfs_file_name + ASCIIToUTF16("-journal")] = 188 file_names_[vfs_file_name + ASCIIToUTF16("-journal")] =
189 FilePath::FromWStringHack(file_name.ToWStringHack() + 189 FilePath::FromWStringHack(file_name.ToWStringHack() +
190 ASCIIToWide("-journal")); 190 ASCIIToWide("-journal"));
191 } 191 }
192 192
193 FilePath SimpleDatabaseSystem::GetFullFilePathForVfsFile( 193 FilePath SimpleDatabaseSystem::GetFullFilePathForVfsFile(
194 const string16& vfs_file_name) { 194 const string16& vfs_file_name) {
195 if (vfs_file_name.empty()) // temp file, used for vacuuming
196 return FilePath();
197
195 AutoLock file_names_auto_lock(file_names_lock_); 198 AutoLock file_names_auto_lock(file_names_lock_);
196 DCHECK(file_names_.find(vfs_file_name) != file_names_.end()); 199 DCHECK(file_names_.find(vfs_file_name) != file_names_.end());
197 return file_names_[vfs_file_name]; 200 return file_names_[vfs_file_name];
198 } 201 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698