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

Side by Side Diff: webkit/appcache/appcache_storage_impl.cc

Issue 8960011: base::Bind: Remove NewRunnableFunction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Lame TODO. Created 8 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 | « tools/valgrind/common.py ('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) 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/appcache/appcache_storage_impl.h" 5 #include "webkit/appcache/appcache_storage_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 26 matching lines...) Expand all
37 // Hard coded default when not using quota management. 37 // Hard coded default when not using quota management.
38 static const int kDefaultQuota = 5 * 1024 * 1024; 38 static const int kDefaultQuota = 5 * 1024 * 1024;
39 39
40 static const int kMaxDiskCacheSize = 250 * 1024 * 1024; 40 static const int kMaxDiskCacheSize = 250 * 1024 * 1024;
41 static const int kMaxMemDiskCacheSize = 10 * 1024 * 1024; 41 static const int kMaxMemDiskCacheSize = 10 * 1024 * 1024;
42 static const FilePath::CharType kDiskCacheDirectoryName[] = 42 static const FilePath::CharType kDiskCacheDirectoryName[] =
43 FILE_PATH_LITERAL("Cache"); 43 FILE_PATH_LITERAL("Cache");
44 44
45 namespace { 45 namespace {
46 46
47 // Helper with no return value for use with NewRunnableFunction. 47 // Helper with no return value for use with base::Bind.
48 // TODO(jhawkins): Figure out why base::IgnoreResult does not work for
49 // file_util::Delete on Windows.
48 void DeleteDirectory(const FilePath& path) { 50 void DeleteDirectory(const FilePath& path) {
49 file_util::Delete(path, true); 51 file_util::Delete(path, true);
50 } 52 }
51 53
52 // Helpers for clearing data from the AppCacheDatabase. 54 // Helpers for clearing data from the AppCacheDatabase.
53 bool DeleteGroupAndRelatedRecords(AppCacheDatabase* database, 55 bool DeleteGroupAndRelatedRecords(AppCacheDatabase* database,
54 int64 group_id, 56 int64 group_id,
55 std::vector<int64>* deletable_response_ids) { 57 std::vector<int64>* deletable_response_ids) {
56 AppCacheDatabase::CacheRecord cache_record; 58 AppCacheDatabase::CacheRecord cache_record;
57 bool success = false; 59 bool success = false;
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 Disable(); 1714 Disable();
1713 if (!is_incognito_) { 1715 if (!is_incognito_) {
1714 VLOG(1) << "Deleting existing appcache data and starting over."; 1716 VLOG(1) << "Deleting existing appcache data and starting over.";
1715 db_thread_->PostTask( 1717 db_thread_->PostTask(
1716 FROM_HERE, base::Bind(&DeleteDirectory, cache_directory_)); 1718 FROM_HERE, base::Bind(&DeleteDirectory, cache_directory_));
1717 } 1719 }
1718 } 1720 }
1719 } 1721 }
1720 1722
1721 } // namespace appcache 1723 } // namespace appcache
OLDNEW
« no previous file with comments | « tools/valgrind/common.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698