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

Side by Side Diff: webkit/fileapi/obfuscated_file_system_file_util.cc

Issue 7812036: Update base/timer.h code to pass through Location from call sites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 // 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 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 (!create || !file_util::CreateDirectory(path))) 1140 (!create || !file_util::CreateDirectory(path)))
1141 return FilePath(); 1141 return FilePath();
1142 return path; 1142 return path;
1143 } 1143 }
1144 1144
1145 void ObfuscatedFileSystemFileUtil::MarkUsed() { 1145 void ObfuscatedFileSystemFileUtil::MarkUsed() {
1146 if (timer_.IsRunning()) 1146 if (timer_.IsRunning())
1147 timer_.Reset(); 1147 timer_.Reset();
1148 else 1148 else
1149 timer_.Start(base::TimeDelta::FromSeconds(kFlushDelaySeconds), this, 1149 timer_.Start(base::TimeDelta::FromSeconds(kFlushDelaySeconds), this,
1150 &ObfuscatedFileSystemFileUtil::DropDatabases); 1150 &ObfuscatedFileSystemFileUtil::DropDatabases, FROM_HERE);
1151 } 1151 }
1152 1152
1153 void ObfuscatedFileSystemFileUtil::DropDatabases() { 1153 void ObfuscatedFileSystemFileUtil::DropDatabases() {
1154 origin_database_.reset(); 1154 origin_database_.reset();
1155 STLDeleteContainerPairSecondPointers( 1155 STLDeleteContainerPairSecondPointers(
1156 directories_.begin(), directories_.end()); 1156 directories_.begin(), directories_.end());
1157 directories_.clear(); 1157 directories_.clear();
1158 } 1158 }
1159 1159
1160 // static 1160 // static
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 return false; 1197 return false;
1198 } 1198 }
1199 origin_database_.reset( 1199 origin_database_.reset(
1200 new FileSystemOriginDatabase( 1200 new FileSystemOriginDatabase(
1201 file_system_directory_.AppendASCII(kOriginDatabaseName))); 1201 file_system_directory_.AppendASCII(kOriginDatabaseName)));
1202 } 1202 }
1203 return true; 1203 return true;
1204 } 1204 }
1205 1205
1206 } // namespace fileapi 1206 } // namespace fileapi
OLDNEW
« base/timer.h ('K') | « views/repeat_controller.cc ('k') | webkit/glue/resource_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698