Commit 42c2b47e authored by gavinp@chromium.org's avatar gavinp@chromium.org

Remove bad const from disk_cache::Backend interface.

http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Use_of_const tells me not to use const where it's confusing. The instances of const removed by this CL are definitely confusing since they aren't even part of the interfaces they're written in. Worse yet, our Windows compiler gives errors if you override without matching them.

This issue is upstream of https://codereview.chromium.org/12192005/ (Add simple cache backend), and must land before it so as to not break the windows build.

R=rvargas@chromium.org
BUG=None

Review URL: https://chromiumcodereview.appspot.com/12207120

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182065 0039d316-1c4b-4281-b951-d872f2087c98
parent e35cbfaa
...@@ -73,9 +73,9 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend { ...@@ -73,9 +73,9 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
int SyncCreateEntry(const std::string& key, Entry** entry); int SyncCreateEntry(const std::string& key, Entry** entry);
int SyncDoomEntry(const std::string& key); int SyncDoomEntry(const std::string& key);
int SyncDoomAllEntries(); int SyncDoomAllEntries();
int SyncDoomEntriesBetween(const base::Time initial_time, int SyncDoomEntriesBetween(base::Time initial_time,
const base::Time end_time); base::Time end_time);
int SyncDoomEntriesSince(const base::Time initial_time); int SyncDoomEntriesSince(base::Time initial_time);
int SyncOpenNextEntry(void** iter, Entry** next_entry); int SyncOpenNextEntry(void** iter, Entry** next_entry);
int SyncOpenPrevEntry(void** iter, Entry** prev_entry); int SyncOpenPrevEntry(void** iter, Entry** prev_entry);
void SyncEndEnumeration(void* iter); void SyncEndEnumeration(void* iter);
...@@ -269,10 +269,10 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend { ...@@ -269,10 +269,10 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
virtual int DoomEntry(const std::string& key, virtual int DoomEntry(const std::string& key,
const CompletionCallback& callback) OVERRIDE; const CompletionCallback& callback) OVERRIDE;
virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE; virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE;
virtual int DoomEntriesBetween(const base::Time initial_time, virtual int DoomEntriesBetween(base::Time initial_time,
const base::Time end_time, base::Time end_time,
const CompletionCallback& callback) OVERRIDE; const CompletionCallback& callback) OVERRIDE;
virtual int DoomEntriesSince(const base::Time initial_time, virtual int DoomEntriesSince(base::Time initial_time,
const CompletionCallback& callback) OVERRIDE; const CompletionCallback& callback) OVERRIDE;
virtual int OpenNextEntry(void** iter, Entry** next_entry, virtual int OpenNextEntry(void** iter, Entry** next_entry,
const CompletionCallback& callback) OVERRIDE; const CompletionCallback& callback) OVERRIDE;
......
...@@ -106,14 +106,14 @@ class NET_EXPORT Backend { ...@@ -106,14 +106,14 @@ class NET_EXPORT Backend {
// either direction by using null Time values for either argument. The return // either direction by using null Time values for either argument. The return
// value is a net error code. If this method returns ERR_IO_PENDING, the // value is a net error code. If this method returns ERR_IO_PENDING, the
// |callback| will be invoked when the operation completes. // |callback| will be invoked when the operation completes.
virtual int DoomEntriesBetween(const base::Time initial_time, virtual int DoomEntriesBetween(base::Time initial_time,
const base::Time end_time, base::Time end_time,
const CompletionCallback& callback) = 0; const CompletionCallback& callback) = 0;
// Marks all entries accessed since |initial_time| for deletion. The return // Marks all entries accessed since |initial_time| for deletion. The return
// value is a net error code. If this method returns ERR_IO_PENDING, the // value is a net error code. If this method returns ERR_IO_PENDING, the
// |callback| will be invoked when the operation completes. // |callback| will be invoked when the operation completes.
virtual int DoomEntriesSince(const base::Time initial_time, virtual int DoomEntriesSince(base::Time initial_time,
const CompletionCallback& callback) = 0; const CompletionCallback& callback) = 0;
// Enumerates the cache. Initialize |iter| to NULL before calling this method // Enumerates the cache. Initialize |iter| to NULL before calling this method
......
...@@ -71,10 +71,10 @@ class NET_EXPORT_PRIVATE MemBackendImpl : public Backend { ...@@ -71,10 +71,10 @@ class NET_EXPORT_PRIVATE MemBackendImpl : public Backend {
virtual int DoomEntry(const std::string& key, virtual int DoomEntry(const std::string& key,
const CompletionCallback& callback) OVERRIDE; const CompletionCallback& callback) OVERRIDE;
virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE; virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE;
virtual int DoomEntriesBetween(const base::Time initial_time, virtual int DoomEntriesBetween(base::Time initial_time,
const base::Time end_time, base::Time end_time,
const CompletionCallback& callback) OVERRIDE; const CompletionCallback& callback) OVERRIDE;
virtual int DoomEntriesSince(const base::Time initial_time, virtual int DoomEntriesSince(base::Time initial_time,
const CompletionCallback& callback) OVERRIDE; const CompletionCallback& callback) OVERRIDE;
virtual int OpenNextEntry(void** iter, Entry** next_entry, virtual int OpenNextEntry(void** iter, Entry** next_entry,
const CompletionCallback& callback) OVERRIDE; const CompletionCallback& callback) OVERRIDE;
......
...@@ -106,11 +106,11 @@ class MockDiskCache : public disk_cache::Backend { ...@@ -106,11 +106,11 @@ class MockDiskCache : public disk_cache::Backend {
const net::CompletionCallback& callback) OVERRIDE; const net::CompletionCallback& callback) OVERRIDE;
virtual int DoomAllEntries(const net::CompletionCallback& callback) OVERRIDE; virtual int DoomAllEntries(const net::CompletionCallback& callback) OVERRIDE;
virtual int DoomEntriesBetween( virtual int DoomEntriesBetween(
const base::Time initial_time, base::Time initial_time,
const base::Time end_time, base::Time end_time,
const net::CompletionCallback& callback) OVERRIDE; const net::CompletionCallback& callback) OVERRIDE;
virtual int DoomEntriesSince( virtual int DoomEntriesSince(
const base::Time initial_time, base::Time initial_time,
const net::CompletionCallback& callback) OVERRIDE; const net::CompletionCallback& callback) OVERRIDE;
virtual int OpenNextEntry(void** iter, disk_cache::Entry** next_entry, virtual int OpenNextEntry(void** iter, disk_cache::Entry** next_entry,
const net::CompletionCallback& callback) OVERRIDE; const net::CompletionCallback& callback) OVERRIDE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment