Skip to content

Commit

Permalink
Add OVERRIDE to net/.
Browse files Browse the repository at this point in the history
BUG=104314

Review URL: http://codereview.chromium.org/8568021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110231 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
avi@chromium.org committed Nov 16, 2011
1 parent 3986f1e commit f2cbbc8
Show file tree
Hide file tree
Showing 89 changed files with 779 additions and 687 deletions.
4 changes: 2 additions & 2 deletions net/base/address_list_net_log_param.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Expand All @@ -18,7 +18,7 @@ class AddressListNetLogParam : public NetLog::EventParameters {
public:
explicit AddressListNetLogParam(const AddressList& address_list);

virtual base::Value* ToValue() const;
virtual base::Value* ToValue() const OVERRIDE;

private:
AddressList address_list_;
Expand Down
2 changes: 1 addition & 1 deletion net/base/cert_verifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class NET_EXPORT CertVerifier : NON_EXPORTED_BASE(public base::NonThreadSafe),
const CertVerifyResult& verify_result);

// CertDatabase::Observer methods:
virtual void OnCertTrustChanged(const X509Certificate* cert);
virtual void OnCertTrustChanged(const X509Certificate* cert) OVERRIDE;

// cache_ maps from a request to a cached result. The cached result may
// have expired and the size of |cache_| must be <= max_cache_entries_.
Expand Down
2 changes: 1 addition & 1 deletion net/base/cookie_monster_store_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class MockCookieMonsterDelegate : public CookieMonster::Delegate {
virtual void OnCookieChanged(
const CookieMonster::CanonicalCookie& cookie,
bool removed,
CookieMonster::Delegate::ChangeCause cause);
CookieMonster::Delegate::ChangeCause cause) OVERRIDE;

private:
virtual ~MockCookieMonsterDelegate();
Expand Down
10 changes: 5 additions & 5 deletions net/base/cookie_store_test_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ class DelayedCookieMonster : public CookieStore {
const GURL& url,
const std::string& cookie_line,
const CookieOptions& options,
const CookieMonster::SetCookiesCallback& callback);
const CookieMonster::SetCookiesCallback& callback) OVERRIDE;

virtual void GetCookiesWithOptionsAsync(
const GURL& url, const CookieOptions& options,
const CookieMonster::GetCookiesCallback& callback);
const CookieMonster::GetCookiesCallback& callback) OVERRIDE;

virtual void GetCookiesWithInfoAsync(
const GURL& url,
const CookieOptions& options,
const CookieMonster::GetCookieInfoCallback& callback);
const CookieMonster::GetCookieInfoCallback& callback) OVERRIDE;

virtual bool SetCookieWithOptions(const GURL& url,
const std::string& cookie_line,
Expand All @@ -56,9 +56,9 @@ class DelayedCookieMonster : public CookieStore {

virtual void DeleteCookieAsync(const GURL& url,
const std::string& cookie_name,
const base::Closure& callback);
const base::Closure& callback) OVERRIDE;

virtual CookieMonster* GetCookieMonster();
virtual CookieMonster* GetCookieMonster() OVERRIDE;

private:

Expand Down
2 changes: 1 addition & 1 deletion net/base/dnsrr_resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class NET_EXPORT DnsRRResolver
void CancelResolve(Handle handle);

// Implementation of NetworkChangeNotifier::IPAddressObserver
virtual void OnIPAddressChanged();
virtual void OnIPAddressChanged() OVERRIDE;

private:
friend class RRResolverWorker;
Expand Down
3 changes: 2 additions & 1 deletion net/base/gzip_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ class GZipFilter : public Filter {
// stream_buffer_. On the other hand, *dest_len can be 0 upon successful
// return. For example, the internal zlib may process some pre-filter data
// but not produce output yet.
virtual FilterStatus ReadFilteredData(char* dest_buffer, int* dest_len);
virtual FilterStatus ReadFilteredData(char* dest_buffer,
int* dest_len) OVERRIDE;

private:
enum DecodingStatus {
Expand Down
4 changes: 2 additions & 2 deletions net/base/host_resolver_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class NET_EXPORT HostResolverImpl
void AbortAllInProgressJobs();

// NetworkChangeNotifier::IPAddressObserver methods:
virtual void OnIPAddressChanged();
virtual void OnIPAddressChanged() OVERRIDE;

// Helper methods to get and set max_retry_attempts_.
size_t max_retry_attempts() const {
Expand All @@ -289,7 +289,7 @@ class NET_EXPORT HostResolverImpl
}

// NetworkChangeNotifier::OnDNSChanged methods:
virtual void OnDNSChanged();
virtual void OnDNSChanged() OVERRIDE;

// Cache of host resolution results.
scoped_ptr<HostCache> cache_;
Expand Down
4 changes: 2 additions & 2 deletions net/base/listen_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ class NET_EXPORT ListenSocket : public base::RefCountedThreadSafe<ListenSocket>,
HANDLE socket_event_;
#elif defined(OS_POSIX)
// Called by MessagePumpLibevent when the socket is ready to do I/O
virtual void OnFileCanReadWithoutBlocking(int fd);
virtual void OnFileCanWriteWithoutBlocking(int fd);
virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
WaitState wait_state_;
// The socket's libevent wrapper
MessageLoopForIO::FileDescriptorWatcher watcher_;
Expand Down
9 changes: 6 additions & 3 deletions net/base/listen_socket_unittest.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ class ListenSocketTester :
virtual bool Send(SOCKET sock, const std::string& str);

// ListenSocket::ListenSocketDelegate:
virtual void DidAccept(ListenSocket *server, ListenSocket *connection);
virtual void DidRead(ListenSocket *connection, const char* data, int len);
virtual void DidClose(ListenSocket *sock);
virtual void DidAccept(ListenSocket *server,
ListenSocket *connection) OVERRIDE;
virtual void DidRead(ListenSocket *connection,
const char* data,
int len) OVERRIDE;
virtual void DidClose(ListenSocket *sock) OVERRIDE;

scoped_ptr<base::Thread> thread_;
MessageLoopForIO* loop_;
Expand Down
18 changes: 9 additions & 9 deletions net/base/mock_filter_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,30 @@ class MockFilterContext : public FilterContext {
is_sdch_response_ = is_sdch_response;
}

virtual bool GetMimeType(std::string* mime_type) const;
virtual bool GetMimeType(std::string* mime_type) const OVERRIDE;

// What URL was used to access this data?
// Return false if gurl is not present.
virtual bool GetURL(GURL* gurl) const;
virtual bool GetURL(GURL* gurl) const OVERRIDE;

// What was this data requested from a server?
virtual base::Time GetRequestTime() const;
virtual base::Time GetRequestTime() const OVERRIDE;

// Is data supplied from cache, or fresh across the net?
virtual bool IsCachedContent() const;
virtual bool IsCachedContent() const OVERRIDE;

// Is this a download?
virtual bool IsDownload() const;
virtual bool IsDownload() const OVERRIDE;

// Was this data flagged as a response to a request with an SDCH dictionary?
virtual bool IsSdchResponse() const;
virtual bool IsSdchResponse() const OVERRIDE;

// How many bytes were fed to filter(s) so far?
virtual int64 GetByteReadCount() const;
virtual int64 GetByteReadCount() const OVERRIDE;

virtual int GetResponseCode() const;
virtual int GetResponseCode() const OVERRIDE;

virtual void RecordPacketStats(StatisticSelector statistic) const {}
virtual void RecordPacketStats(StatisticSelector statistic) const OVERRIDE {}

private:
int buffer_size_;
Expand Down
2 changes: 1 addition & 1 deletion net/base/mock_host_resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class RuleBasedHostResolverProc : public HostResolverProc {
AddressFamily address_family,
HostResolverFlags host_resolver_flags,
AddressList* addrlist,
int* os_error);
int* os_error) OVERRIDE;

private:
struct Rule;
Expand Down
7 changes: 4 additions & 3 deletions net/base/net_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <vector>

#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "net/base/net_export.h"

Expand Down Expand Up @@ -294,7 +295,7 @@ class NET_EXPORT NetLogStringParameter : public NetLog::EventParameters {
return value_;
}

virtual base::Value* ToValue() const;
virtual base::Value* ToValue() const OVERRIDE;

private:
const char* const name_;
Expand All @@ -313,7 +314,7 @@ class NetLogIntegerParameter : public NetLog::EventParameters {
return value_;
}

virtual base::Value* ToValue() const;
virtual base::Value* ToValue() const OVERRIDE;

private:
const char* name_;
Expand All @@ -332,7 +333,7 @@ class NET_EXPORT NetLogSourceParameter : public NetLog::EventParameters {
return value_;
}

virtual base::Value* ToValue() const;
virtual base::Value* ToValue() const OVERRIDE;

private:
const char* name_;
Expand Down
4 changes: 2 additions & 2 deletions net/base/net_test_suite.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class NetTestSuite : public base::TestSuite {
NetTestSuite(int argc, char** argv);
virtual ~NetTestSuite();

virtual void Initialize();
virtual void Initialize() OVERRIDE;

virtual void Shutdown();
virtual void Shutdown() OVERRIDE;

protected:

Expand Down
3 changes: 2 additions & 1 deletion net/base/sdch_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class NET_EXPORT_PRIVATE SdchFilter : public Filter {
// Upon entry, *dest_len is the total size (in number of chars) of the
// destination buffer. Upon exit, *dest_len is the actual number of chars
// written into the destination buffer.
virtual FilterStatus ReadFilteredData(char* dest_buffer, int* dest_len);
virtual FilterStatus ReadFilteredData(char* dest_buffer,
int* dest_len) OVERRIDE;

private:
// Internal status. Once we enter an error state, we stop processing data.
Expand Down
3 changes: 2 additions & 1 deletion net/base/ssl_client_auth_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <string>
#include <map>

#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "net/base/cert_database.h"
#include "net/base/net_export.h"
Expand Down Expand Up @@ -47,7 +48,7 @@ class NET_EXPORT_PRIVATE SSLClientAuthCache : public CertDatabase::Observer {
void Remove(const std::string& server);

// CertDatabase::Observer methods:
virtual void OnUserCertAdded(const X509Certificate* cert);
virtual void OnUserCertAdded(const X509Certificate* cert) OVERRIDE;

private:
typedef std::string AuthCacheKey;
Expand Down
2 changes: 1 addition & 1 deletion net/base/ssl_config_service_defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class NET_EXPORT SSLConfigServiceDefaults : public SSLConfigService {
SSLConfigServiceDefaults();

// Store default SSL config settings in |config|.
virtual void GetSSLConfig(SSLConfig* config);
virtual void GetSSLConfig(SSLConfig* config) OVERRIDE;

private:
virtual ~SSLConfigServiceDefaults();
Expand Down
3 changes: 2 additions & 1 deletion net/base/test_completion_callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#pragma once

#include "base/callback_old.h"
#include "base/compiler_specific.h"
#include "base/tuple.h"
#include "net/base/completion_callback.h"

Expand All @@ -32,7 +33,7 @@ class TestOldCompletionCallback : public CallbackRunner< Tuple1<int> > {

bool have_result() const { return have_result_; }

virtual void RunWithParams(const Tuple1<int>& params);
virtual void RunWithParams(const Tuple1<int>& params) OVERRIDE;

private:
int result_;
Expand Down
23 changes: 12 additions & 11 deletions net/disk_cache/backend_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,23 +257,24 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
int SelfCheck();

// Backend interface.
virtual int32 GetEntryCount() const;
virtual int32 GetEntryCount() const OVERRIDE;
virtual int OpenEntry(const std::string& key, Entry** entry,
OldCompletionCallback* callback);
OldCompletionCallback* callback) OVERRIDE;
virtual int CreateEntry(const std::string& key, Entry** entry,
OldCompletionCallback* callback);
virtual int DoomEntry(const std::string& key, OldCompletionCallback* callback);
virtual int DoomAllEntries(OldCompletionCallback* callback);
OldCompletionCallback* callback) OVERRIDE;
virtual int DoomEntry(const std::string& key,
OldCompletionCallback* callback) OVERRIDE;
virtual int DoomAllEntries(OldCompletionCallback* callback) OVERRIDE;
virtual int DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time,
OldCompletionCallback* callback);
OldCompletionCallback* callback) OVERRIDE;
virtual int DoomEntriesSince(const base::Time initial_time,
OldCompletionCallback* callback);
OldCompletionCallback* callback) OVERRIDE;
virtual int OpenNextEntry(void** iter, Entry** next_entry,
OldCompletionCallback* callback);
virtual void EndEnumeration(void** iter);
virtual void GetStats(StatsItems* stats);
virtual void OnExternalCacheHit(const std::string& key);
OldCompletionCallback* callback) OVERRIDE;
virtual void EndEnumeration(void** iter) OVERRIDE;
virtual void GetStats(StatsItems* stats) OVERRIDE;
virtual void OnExternalCacheHit(const std::string& key) OVERRIDE;

private:
typedef base::hash_map<CacheAddr, EntryImpl*> EntriesMap;
Expand Down
4 changes: 2 additions & 2 deletions net/disk_cache/disk_cache_test_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class DiskCacheTest : public PlatformTest {
// Deletes the contents of |cache_path_|.
bool CleanupCacheDir();

virtual void TearDown();
virtual void TearDown() OVERRIDE;

FilePath cache_path_;

Expand Down Expand Up @@ -131,7 +131,7 @@ class DiskCacheTestWithCache : public DiskCacheTest {
void TrimDeletedListForTest(bool empty);

// DiskCacheTest:
virtual void TearDown();
virtual void TearDown() OVERRIDE;

// cache_ will always have a valid object, regardless of how the cache was
// initialized. The implementation pointers can be NULL.
Expand Down
2 changes: 1 addition & 1 deletion net/disk_cache/disk_cache_test_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class CallbackTest : public CallbackRunner< Tuple1<int> > {
CallbackTest(MessageLoopHelper* helper, bool reuse);
virtual ~CallbackTest();

virtual void RunWithParams(const Tuple1<int>& params);
virtual void RunWithParams(const Tuple1<int>& params) OVERRIDE;

private:
MessageLoopHelper* helper_;
Expand Down
38 changes: 21 additions & 17 deletions net/disk_cache/entry_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,26 +140,30 @@ class NET_EXPORT_PRIVATE EntryImpl
static int NumBlocksForEntry(int key_size);

// Entry interface.
virtual void Doom();
virtual void Close();
virtual std::string GetKey() const;
virtual base::Time GetLastUsed() const;
virtual base::Time GetLastModified() const;
virtual int32 GetDataSize(int index) const;
virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
net::OldCompletionCallback* completion_callback);
virtual void Doom() OVERRIDE;
virtual void Close() OVERRIDE;
virtual std::string GetKey() const OVERRIDE;
virtual base::Time GetLastUsed() const OVERRIDE;
virtual base::Time GetLastModified() const OVERRIDE;
virtual int32 GetDataSize(int index) const OVERRIDE;
virtual int ReadData(
int index, int offset, net::IOBuffer* buf, int buf_len,
net::OldCompletionCallback* completion_callback) OVERRIDE;
virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
net::OldCompletionCallback* completion_callback,
bool truncate);
virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
net::OldCompletionCallback* completion_callback);
virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
net::OldCompletionCallback* completion_callback);
bool truncate) OVERRIDE;
virtual int ReadSparseData(
int64 offset, net::IOBuffer* buf, int buf_len,
net::OldCompletionCallback* completion_callback) OVERRIDE;
virtual int WriteSparseData(
int64 offset, net::IOBuffer* buf, int buf_len,
net::OldCompletionCallback* completion_callback) OVERRIDE;
virtual int GetAvailableRange(int64 offset, int len, int64* start,
OldCompletionCallback* callback);
virtual bool CouldBeSparse() const;
virtual void CancelSparseIO();
virtual int ReadyForSparseIO(net::OldCompletionCallback* completion_callback);
OldCompletionCallback* callback) OVERRIDE;
virtual bool CouldBeSparse() const OVERRIDE;
virtual void CancelSparseIO() OVERRIDE;
virtual int ReadyForSparseIO(
net::OldCompletionCallback* completion_callback) OVERRIDE;

private:
enum {
Expand Down
3 changes: 2 additions & 1 deletion net/disk_cache/in_flight_backend_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ class InFlightBackendIO : public InFlightIO {
}

protected:
virtual void OnOperationComplete(BackgroundIO* operation, bool cancel);
virtual void OnOperationComplete(BackgroundIO* operation,
bool cancel) OVERRIDE;

private:
void PostOperation(BackendIO* operation);
Expand Down
Loading

0 comments on commit f2cbbc8

Please sign in to comment.