OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/fileapi/obfuscated_file_system_file_util.h" | 5 #include "webkit/fileapi/obfuscated_file_system_file_util.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 return FilePath(); | 1188 return FilePath(); |
1189 } | 1189 } |
1190 | 1190 |
1191 return path; | 1191 return path; |
1192 } | 1192 } |
1193 | 1193 |
1194 void ObfuscatedFileSystemFileUtil::MarkUsed() { | 1194 void ObfuscatedFileSystemFileUtil::MarkUsed() { |
1195 if (timer_.IsRunning()) | 1195 if (timer_.IsRunning()) |
1196 timer_.Reset(); | 1196 timer_.Reset(); |
1197 else | 1197 else |
1198 timer_.Start(base::TimeDelta::FromSeconds(kFlushDelaySeconds), this, | 1198 timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(kFlushDelaySeconds), |
1199 &ObfuscatedFileSystemFileUtil::DropDatabases); | 1199 this, &ObfuscatedFileSystemFileUtil::DropDatabases); |
1200 } | 1200 } |
1201 | 1201 |
1202 void ObfuscatedFileSystemFileUtil::DropDatabases() { | 1202 void ObfuscatedFileSystemFileUtil::DropDatabases() { |
1203 origin_database_.reset(); | 1203 origin_database_.reset(); |
1204 STLDeleteContainerPairSecondPointers( | 1204 STLDeleteContainerPairSecondPointers( |
1205 directories_.begin(), directories_.end()); | 1205 directories_.begin(), directories_.end()); |
1206 directories_.clear(); | 1206 directories_.clear(); |
1207 } | 1207 } |
1208 | 1208 |
1209 // static | 1209 // static |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 return false; | 1246 return false; |
1247 } | 1247 } |
1248 origin_database_.reset( | 1248 origin_database_.reset( |
1249 new FileSystemOriginDatabase( | 1249 new FileSystemOriginDatabase( |
1250 file_system_directory_.AppendASCII(kOriginDatabaseName))); | 1250 file_system_directory_.AppendASCII(kOriginDatabaseName))); |
1251 } | 1251 } |
1252 return true; | 1252 return true; |
1253 } | 1253 } |
1254 | 1254 |
1255 } // namespace fileapi | 1255 } // namespace fileapi |
OLD | NEW |