public:
class MockFrontend : public AppCacheFrontend {
public:
- virtual void OnCacheSelected(
- int host_id, const AppCacheInfo& info) OVERRIDE {}
+ void OnCacheSelected(int host_id, const AppCacheInfo& info) override {}
- virtual void OnStatusChanged(const std::vector<int>& host_ids,
- AppCacheStatus status) OVERRIDE {}
+ void OnStatusChanged(const std::vector<int>& host_ids,
+ AppCacheStatus status) override {}
- virtual void OnEventRaised(const std::vector<int>& host_ids,
- AppCacheEventID event_id) OVERRIDE {}
+ void OnEventRaised(const std::vector<int>& host_ids,
+ AppCacheEventID event_id) override {}
- virtual void OnErrorEventRaised(
- const std::vector<int>& host_ids,
- const AppCacheErrorDetails& details) OVERRIDE {}
+ void OnErrorEventRaised(const std::vector<int>& host_ids,
+ const AppCacheErrorDetails& details) override {}
- virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
- const GURL& url,
- int num_total,
- int num_complete) OVERRIDE {
- }
+ void OnProgressEventRaised(const std::vector<int>& host_ids,
+ const GURL& url,
+ int num_total,
+ int num_complete) override {}
- virtual void OnLogMessage(int host_id,
- AppCacheLogLevel log_level,
- const std::string& message) OVERRIDE {
- }
+ void OnLogMessage(int host_id,
+ AppCacheLogLevel log_level,
+ const std::string& message) override {}
- virtual void OnContentBlocked(int host_id,
- const GURL& manifest_url) OVERRIDE {}
+ void OnContentBlocked(int host_id, const GURL& manifest_url) override {}
};
// Helper callback to run a test on our io_thread. The io_thread is spun up
// exercise fallback code paths.
class MockURLRequestDelegate : public net::URLRequest::Delegate {
- virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE {}
- virtual void OnReadCompleted(net::URLRequest* request,
- int bytes_read) OVERRIDE {
- }
+ void OnResponseStarted(net::URLRequest* request) override {}
+ void OnReadCompleted(net::URLRequest* request, int bytes_read) override {}
};
class MockURLRequestJob : public net::URLRequestJob {
response_info_(info) {}
protected:
- virtual ~MockURLRequestJob() {}
- virtual void Start() OVERRIDE {
- NotifyHeadersComplete();
- }
- virtual int GetResponseCode() const OVERRIDE {
- return response_code_;
- }
- virtual void GetResponseInfo(
- net::HttpResponseInfo* info) OVERRIDE {
+ ~MockURLRequestJob() override {}
+ void Start() override { NotifyHeadersComplete(); }
+ int GetResponseCode() const override { return response_code_; }
+ void GetResponseInfo(net::HttpResponseInfo* info) override {
if (!has_response_info_)
return;
*info = response_info_;
MockURLRequestJobFactory() : job_(NULL) {
}
- virtual ~MockURLRequestJobFactory() {
- DCHECK(!job_);
- }
+ ~MockURLRequestJobFactory() override { DCHECK(!job_); }
void SetJob(net::URLRequestJob* job) {
job_ = job;
}
- virtual net::URLRequestJob* MaybeCreateJobWithProtocolHandler(
+ net::URLRequestJob* MaybeCreateJobWithProtocolHandler(
const std::string& scheme,
net::URLRequest* request,
- net::NetworkDelegate* network_delegate) const OVERRIDE {
+ net::NetworkDelegate* network_delegate) const override {
if (job_) {
net::URLRequestJob* temp = job_;
job_ = NULL;
}
}
- virtual bool IsHandledProtocol(const std::string& scheme) const OVERRIDE {
+ net::URLRequestJob* MaybeInterceptRedirect(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
+ const GURL& location) const override {
+ return nullptr;
+ }
+
+ net::URLRequestJob* MaybeInterceptResponse(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const override {
+ return nullptr;
+ }
+
+ bool IsHandledProtocol(const std::string& scheme) const override {
return scheme == "http";
};
- virtual bool IsHandledURL(const GURL& url) const OVERRIDE {
+ bool IsHandledURL(const GURL& url) const override {
return url.SchemeIs("http");
}
- virtual bool IsSafeRedirectTarget(const GURL& location) const OVERRIDE {
+ bool IsSafeRedirectTarget(const GURL& location) const override {
return false;
}