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

Unified Diff: chrome/browser/chromeos/gdata/gdata_cache_metadata.h

Issue 10581038: chromeos: Stop returning scoped_ptr from GDataCache::GetCacheEntry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 5 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/chromeos/gdata/gdata_cache.cc ('k') | chrome/browser/chromeos/gdata/gdata_cache_metadata.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_cache_metadata.h
diff --git a/chrome/browser/chromeos/gdata/gdata_cache_metadata.h b/chrome/browser/chromeos/gdata/gdata_cache_metadata.h
index 53ad383ce4a8b3dd0254d60d00866b5c4e46b20c..0f0f72d5698c0ebc3442b626342e0db8f1ec87f7 100644
--- a/chrome/browser/chromeos/gdata/gdata_cache_metadata.h
+++ b/chrome/browser/chromeos/gdata/gdata_cache_metadata.h
@@ -43,14 +43,14 @@ class GDataCacheMetadata {
// Removes entry corresponding to |resource_id| from cache map.
virtual void RemoveCacheEntry(const std::string& resource_id) = 0;
- // Returns the cache entry for file corresponding to |resource_id| and |md5|
- // if entry exists in cache map. Otherwise, returns NULL.
+ // Gets the cache entry for file corresponding to |resource_id| and |md5|
+ // and returns true if entry exists in cache map. Otherwise, returns false.
// |md5| can be empty if only matching |resource_id| is desired, which may
// happen when looking for pinned entries where symlinks' filenames have no
// extension and hence no md5.
- virtual scoped_ptr<GDataCacheEntry> GetCacheEntry(
- const std::string& resource_id,
- const std::string& md5) = 0;
+ virtual bool GetCacheEntry(const std::string& resource_id,
+ const std::string& md5,
+ GDataCacheEntry* entry) = 0;
// Removes temporary files (files in CACHE_TYPE_TMP) from the cache map.
virtual void RemoveTemporaryFiles() = 0;
@@ -87,9 +87,9 @@ class GDataCacheMetadataMap : public GDataCacheMetadata {
const std::string& resource_id,
const GDataCacheEntry& cache_entry) OVERRIDE;
virtual void RemoveCacheEntry(const std::string& resource_id) OVERRIDE;
- virtual scoped_ptr<GDataCacheEntry> GetCacheEntry(
- const std::string& resource_id,
- const std::string& md5) OVERRIDE;
+ virtual bool GetCacheEntry(const std::string& resource_id,
+ const std::string& md5,
+ GDataCacheEntry* cache_entry) OVERRIDE;
virtual void RemoveTemporaryFiles() OVERRIDE;
virtual void Iterate(const IterateCallback& callback) OVERRIDE;
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_cache.cc ('k') | chrome/browser/chromeos/gdata/gdata_cache_metadata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698