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

Unified Diff: content/browser/net/url_request_mock_net_error_job.h

Issue 7491100: Delete url_request_mock_net_error_job.*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/chrome_tests.gypi ('k') | content/browser/net/url_request_mock_net_error_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/net/url_request_mock_net_error_job.h
diff --git a/content/browser/net/url_request_mock_net_error_job.h b/content/browser/net/url_request_mock_net_error_job.h
deleted file mode 100644
index e0ba914db2eec19b8c2d0d009397af837a341aa1..0000000000000000000000000000000000000000
--- a/content/browser/net/url_request_mock_net_error_job.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// 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.
-
-// A net::URLRequestJob class that simulates network errors (including https
-// related).
-// It is based on URLRequestMockHttpJob.
-
-#ifndef CONTENT_BROWSER_NET_URL_REQUEST_MOCK_NET_ERROR_JOB_H_
-#define CONTENT_BROWSER_NET_URL_REQUEST_MOCK_NET_ERROR_JOB_H_
-#pragma once
-
-#include "base/task.h"
-#include "content/browser/net/url_request_mock_http_job.h"
-
-class URLRequestMockNetErrorJob : public URLRequestMockHTTPJob {
- public:
- URLRequestMockNetErrorJob(net::URLRequest* request,
- const std::vector<int>& errors,
- net::X509Certificate* ssl_cert,
- const FilePath& file_path);
-
- virtual void Start();
- virtual void ContinueDespiteLastError();
-
- // Add the specified URL to the list of URLs that should be mocked. When this
- // URL is hit, the specified |errors| will be played. If any of these errors
- // is a cert error, |ssl_cert| will be used as the ssl cert when notifying of
- // the error. |ssl_cert| can be NULL if |errors| does not contain any cert
- // errors. |base| is the location on disk where the file mocking the URL
- // contents and http-headers should be retrieved from.
- static void AddMockedURL(const GURL& url,
- const std::wstring& base,
- const std::vector<int>& errors,
- net::X509Certificate* ssl_cert);
-
- // Removes the specified |url| from the list of mocked urls.
- static void RemoveMockedURL(const GURL& url);
-
- private:
- virtual ~URLRequestMockNetErrorJob();
-
- static net::URLRequest::ProtocolFactory Factory;
-
- void StartAsync();
-
- // The errors to simulate.
- std::vector<int> errors_;
-
- // The certificate to use for SSL errors.
- scoped_refptr<net::X509Certificate> ssl_cert_;
-
- struct MockInfo;
- typedef std::map<GURL, MockInfo> URLMockInfoMap;
- static URLMockInfoMap url_mock_info_map_;
-
- ScopedRunnableMethodFactory<URLRequestMockNetErrorJob> method_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(URLRequestMockNetErrorJob);
-};
-
-#endif // CONTENT_BROWSER_NET_URL_REQUEST_MOCK_NET_ERROR_JOB_H_
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/browser/net/url_request_mock_net_error_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698