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

Unified Diff: net/proxy/mock_proxy_script_fetcher.cc

Issue 7019015: Revert 85646 - Adds support for the DHCP portion of the WPAD (proxy auto-discovery) protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 | « net/proxy/mock_proxy_script_fetcher.h ('k') | net/proxy/proxy_script_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/mock_proxy_script_fetcher.cc
===================================================================
--- net/proxy/mock_proxy_script_fetcher.cc (revision 85647)
+++ net/proxy/mock_proxy_script_fetcher.cc (working copy)
@@ -1,55 +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.
-
-#include "net/proxy/mock_proxy_script_fetcher.h"
-
-#include "base/logging.h"
-#include "base/string16.h"
-#include "base/utf_string_conversions.h"
-#include "net/base/net_errors.h"
-
-namespace net {
-
-MockProxyScriptFetcher::MockProxyScriptFetcher()
- : pending_request_callback_(NULL), pending_request_text_(NULL) {
-}
-
-// ProxyScriptFetcher implementation.
-int MockProxyScriptFetcher::Fetch(const GURL& url,
- string16* text,
- CompletionCallback* callback) {
- DCHECK(!has_pending_request());
-
- // Save the caller's information, and have them wait.
- pending_request_url_ = url;
- pending_request_callback_ = callback;
- pending_request_text_ = text;
- return ERR_IO_PENDING;
-}
-
-void MockProxyScriptFetcher::NotifyFetchCompletion(
- int result, const std::string& ascii_text) {
- DCHECK(has_pending_request());
- *pending_request_text_ = ASCIIToUTF16(ascii_text);
- CompletionCallback* callback = pending_request_callback_;
- pending_request_callback_ = NULL;
- callback->Run(result);
-}
-
-void MockProxyScriptFetcher::Cancel() {
-}
-
-URLRequestContext* MockProxyScriptFetcher::GetRequestContext() const {
- return NULL;
-}
-
-const GURL& MockProxyScriptFetcher::pending_request_url() const {
- return pending_request_url_;
-}
-
-bool MockProxyScriptFetcher::has_pending_request() const {
- return pending_request_callback_ != NULL;
-}
-
-} // namespace net
« no previous file with comments | « net/proxy/mock_proxy_script_fetcher.h ('k') | net/proxy/proxy_script_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698