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

Side by Side Diff: chrome/browser/chromeos/drive/remove_stale_cache_files_unittest.cc

Issue 16107004: drive: Stop returning FilePath from GetResourceEntryById (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Create a stale cache file. 75 // Create a stale cache file.
76 EXPECT_EQ(FILE_ERROR_OK, 76 EXPECT_EQ(FILE_ERROR_OK,
77 cache_->Store(resource_id, md5, dummy_file, 77 cache_->Store(resource_id, md5, dummy_file,
78 FileCache::FILE_OPERATION_COPY)); 78 FileCache::FILE_OPERATION_COPY));
79 79
80 // Verify that the cache entry exists. 80 // Verify that the cache entry exists.
81 FileCacheEntry cache_entry; 81 FileCacheEntry cache_entry;
82 EXPECT_TRUE(cache_->GetCacheEntry(resource_id, md5, &cache_entry)); 82 EXPECT_TRUE(cache_->GetCacheEntry(resource_id, md5, &cache_entry));
83 83
84 ResourceEntry entry; 84 ResourceEntry entry;
85 EXPECT_EQ( 85 EXPECT_EQ(FILE_ERROR_NOT_FOUND,
86 FILE_ERROR_NOT_FOUND, 86 resource_metadata_->GetResourceEntryById(resource_id, &entry));
87 resource_metadata_->GetResourceEntryById(resource_id, NULL, &entry));
88 87
89 // Remove stale cache files. 88 // Remove stale cache files.
90 RemoveStaleCacheFiles(cache_.get(), resource_metadata_.get()); 89 RemoveStaleCacheFiles(cache_.get(), resource_metadata_.get());
91 90
92 // Verify that the cache entry is deleted. 91 // Verify that the cache entry is deleted.
93 EXPECT_FALSE(cache_->GetCacheEntry(resource_id, md5, &cache_entry)); 92 EXPECT_FALSE(cache_->GetCacheEntry(resource_id, md5, &cache_entry));
94 } 93 }
95 94
96 } // namespace internal 95 } // namespace internal
97 } // namespace drive 96 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/remove_stale_cache_files.cc ('k') | chrome/browser/chromeos/drive/resource_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698