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

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

Issue 6042009: Added WARN_UNUSED_RESULT to ScopedTempDir methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge with trunk 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/fileapi/file_system_path_manager_unittest.cc ('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 10 matching lines...) Expand all
21 21
22 SimpleDatabaseSystem* SimpleDatabaseSystem::instance_ = NULL; 22 SimpleDatabaseSystem* SimpleDatabaseSystem::instance_ = NULL;
23 23
24 SimpleDatabaseSystem* SimpleDatabaseSystem::GetInstance() { 24 SimpleDatabaseSystem* SimpleDatabaseSystem::GetInstance() {
25 DCHECK(instance_); 25 DCHECK(instance_);
26 return instance_; 26 return instance_;
27 } 27 }
28 28
29 SimpleDatabaseSystem::SimpleDatabaseSystem() 29 SimpleDatabaseSystem::SimpleDatabaseSystem()
30 : waiting_for_dbs_to_close_(false) { 30 : waiting_for_dbs_to_close_(false) {
31 temp_dir_.CreateUniqueTempDir(); 31 CHECK(temp_dir_.CreateUniqueTempDir());
32 db_tracker_ = new DatabaseTracker(temp_dir_.path(), false); 32 db_tracker_ = new DatabaseTracker(temp_dir_.path(), false);
33 db_tracker_->AddObserver(this); 33 db_tracker_->AddObserver(this);
34 DCHECK(!instance_); 34 DCHECK(!instance_);
35 instance_ = this; 35 instance_ = this;
36 } 36 }
37 37
38 SimpleDatabaseSystem::~SimpleDatabaseSystem() { 38 SimpleDatabaseSystem::~SimpleDatabaseSystem() {
39 db_tracker_->RemoveObserver(this); 39 db_tracker_->RemoveObserver(this);
40 instance_ = NULL; 40 instance_ = NULL;
41 } 41 }
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 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/fileapi/file_system_path_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698