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/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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 info.cache_id = cache_record.cache_id; | 353 info.cache_id = cache_record.cache_id; |
354 info.group_id = group->group_id; | 354 info.group_id = group->group_id; |
355 info.is_complete = true; | 355 info.is_complete = true; |
356 infos.push_back(info); | 356 infos.push_back(info); |
357 } | 357 } |
358 } | 358 } |
359 } | 359 } |
360 | 360 |
361 void AppCacheStorageImpl::GetAllInfoTask::RunCompleted() { | 361 void AppCacheStorageImpl::GetAllInfoTask::RunCompleted() { |
362 DCHECK(delegates_.size() == 1); | 362 DCHECK(delegates_.size() == 1); |
363 FOR_EACH_DELEGATE(delegates_, OnAllInfo(info_collection_)); | 363 FOR_EACH_DELEGATE(delegates_, OnAllInfo(info_collection_.get())); |
364 } | 364 } |
365 | 365 |
366 // StoreOrLoadTask ------- | 366 // StoreOrLoadTask ------- |
367 | 367 |
368 class AppCacheStorageImpl::StoreOrLoadTask : public DatabaseTask { | 368 class AppCacheStorageImpl::StoreOrLoadTask : public DatabaseTask { |
369 protected: | 369 protected: |
370 explicit StoreOrLoadTask(AppCacheStorageImpl* storage) | 370 explicit StoreOrLoadTask(AppCacheStorageImpl* storage) |
371 : DatabaseTask(storage) {} | 371 : DatabaseTask(storage) {} |
372 | 372 |
373 bool FindRelatedCacheRecords(int64 cache_id); | 373 bool FindRelatedCacheRecords(int64 cache_id); |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1715 Disable(); | 1715 Disable(); |
1716 if (!is_incognito_) { | 1716 if (!is_incognito_) { |
1717 VLOG(1) << "Deleting existing appcache data and starting over."; | 1717 VLOG(1) << "Deleting existing appcache data and starting over."; |
1718 db_thread_->PostTask( | 1718 db_thread_->PostTask( |
1719 FROM_HERE, base::Bind(&DeleteDirectory, cache_directory_)); | 1719 FROM_HERE, base::Bind(&DeleteDirectory, cache_directory_)); |
1720 } | 1720 } |
1721 } | 1721 } |
1722 } | 1722 } |
1723 | 1723 |
1724 } // namespace appcache | 1724 } // namespace appcache |
OLD | NEW |