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

Unified Diff: chrome/browser/android/thumbnail/thumbnail_cache.cc

Issue 1708763003: Fix strict mode violation in TabPersistentStore.cleanupPersistentData() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tab-persist-1
Patch Set: comments & rebase Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/thumbnail/thumbnail_cache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/thumbnail/thumbnail_cache.cc
diff --git a/chrome/browser/android/thumbnail/thumbnail_cache.cc b/chrome/browser/android/thumbnail/thumbnail_cache.cc
index 3f8e90553e3ee572786f3c160a59b47990d970c1..1ad09a7a4486daed45d93a6d2b57bef83ee50c79 100644
--- a/chrome/browser/android/thumbnail/thumbnail_cache.cc
+++ b/chrome/browser/android/thumbnail/thumbnail_cache.cc
@@ -224,14 +224,6 @@ Thumbnail* ThumbnailCache::Get(TabId tab_id,
return NULL;
}
-void ThumbnailCache::RemoveFromDiskAtAndAboveId(TabId min_id) {
- base::Closure remove_task =
- base::Bind(&ThumbnailCache::RemoveFromDiskAtAndAboveIdTask,
- min_id);
- content::BrowserThread::PostTask(
- content::BrowserThread::FILE, FROM_HERE, remove_task);
-}
-
void ThumbnailCache::InvalidateThumbnailIfChanged(TabId tab_id,
const GURL& url) {
ThumbnailMetaDataMap::iterator meta_data_iter =
@@ -343,21 +335,6 @@ void ThumbnailCache::RemoveFromDiskTask(TabId tab_id) {
base::DeleteFile(file_path, false);
}
-void ThumbnailCache::RemoveFromDiskAtAndAboveIdTask(TabId min_id) {
- base::FilePath dir_path = GetCacheDirectory();
- base::FileEnumerator enumerator(dir_path, false, base::FileEnumerator::FILES);
- while (true) {
- base::FilePath path = enumerator.Next();
- if (path.empty())
- break;
- base::FileEnumerator::FileInfo info = enumerator.GetInfo();
- TabId tab_id;
- bool success = base::StringToInt(info.GetName().value(), &tab_id);
- if (success && tab_id >= min_id)
- base::DeleteFile(path, false);
- }
-}
-
void ThumbnailCache::WriteThumbnailIfNecessary(
TabId tab_id,
skia::RefPtr<SkPixelRef> compressed_data,
« no previous file with comments | « chrome/browser/android/thumbnail/thumbnail_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698