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

Unified Diff: remoting/host/url_fetcher.h

Issue 10637008: Remove UrlFetcher from remoting and use the one in net instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments. Created 8 years, 6 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
Index: remoting/host/url_fetcher.h
diff --git a/remoting/host/url_fetcher.h b/remoting/host/url_fetcher.h
deleted file mode 100644
index a77a70fcde765c41101d3d43d86f49b4fed8f465..0000000000000000000000000000000000000000
--- a/remoting/host/url_fetcher.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef REMOTING_HOST_URL_FETCHER_H_
-#define REMOTING_HOST_URL_FETCHER_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/callback_forward.h"
-#include "base/memory/ref_counted.h"
-
-class GURL;
-
-namespace net {
-class URLRequestContextGetter;
-class URLRequestStatus;
-} // namespace net
-
-namespace remoting {
-
-// UrlFetcher implements HTTP querying functionality that is used in
-// remoting code (e.g. in GaiaOAuthClient). It takes care of switching
-// threads when neccessary and provides interface that is simpler to
-// use than net::UrlRequest.
-//
-// This code is a simplified version of content::UrlFetcher from
-// content/common/net. It implements only features that remoting code
-// needs.
-class UrlFetcher {
- public:
- enum Method {
- GET,
- POST,
- };
-
- typedef base::Callback<void(const net::URLRequestStatus& status,
- int response_code,
- const std::string& response)>
- DoneCallback;
-
- UrlFetcher(const GURL& url, Method method);
- ~UrlFetcher();
-
- void SetRequestContext(
- net::URLRequestContextGetter* request_context_getter);
- void SetUploadData(const std::string& upload_content_type,
- const std::string& upload_content);
- void SetHeader(const std::string& key, const std::string& value);
- void Start(const DoneCallback& done_callback);
-
- private:
- // Ref-counted core of the implementation.
- class Core;
-
- scoped_refptr<Core> core_;
-
- DISALLOW_COPY_AND_ASSIGN(UrlFetcher);
-};
-
-} // namespace remoting
-
-#endif // REMOTING_HOST_URL_FETCHER_H_

Powered by Google App Engine
This is Rietveld 408576698