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

Unified Diff: experimental/flocking_geese/url_io/url_request.cc

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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: experimental/flocking_geese/url_io/url_request.cc
diff --git a/experimental/flocking_geese/url_io/url_request.cc b/experimental/flocking_geese/url_io/url_request.cc
deleted file mode 100644
index 6638460bebe4c505557a0079dae946714f030a88..0000000000000000000000000000000000000000
--- a/experimental/flocking_geese/url_io/url_request.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2011 The Native Client 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 "url_io/url_request.h"
-#include <stdio.h>
-
-namespace url_io {
-
-URLRequest::URLRequest(std::string url)
- : url_(url),
- method_(kMethodGet),
- follow_redirect_(true),
- stream_to_file_(false),
- allow_cross_origin_requests_(false),
- allow_credentials_(false) {
-}
-
-URLRequest::URLRequest(std::string url, Method method)
- : url_(url),
- method_(method),
- follow_redirect_(true),
- stream_to_file_(false),
- allow_cross_origin_requests_(false),
- allow_credentials_(false) {
-}
-
-void URLRequest::SetHeader(std::string key, std::string value) {
- if (!key.empty()) {
- headers_[key] = value;
- }
-}
-
-std::string URLRequest::GetHeaderValueForKey(std::string key) {
- return headers_[key];
-}
-
-void URLRequest::RemoveHeader(std::string key) {
- HeaderDictionary::iterator i = headers_.find(key);
- if (i != headers_.end()) {
- headers_.erase(i);
- }
-}
-
-pp::URLRequestInfo URLRequest::GetRequestInfo(pp::Instance* instance) const {
- pp::URLRequestInfo request(instance);
- request.SetURL(url_);
- request.SetMethod((method_ == kMethodGet) ? "GET" : "POST");
- request.SetFollowRedirects(follow_redirect_);
- request.SetStreamToFile(stream_to_file_);
- request.SetAllowCrossOriginRequests(allow_cross_origin_requests_);
- request.SetAllowCredentials(allow_credentials_);
-
- HeaderDictionary::const_iterator i;
- std::string header_str;
- for (i = headers_.begin(); i != headers_.end(); ++i) {
- header_str = header_str + (*i).first + ": " + (*i).second + "\n";
- }
- request.SetHeaders(header_str);
-
- return request;
-}
-
-} // namespace url_io
« no previous file with comments | « experimental/flocking_geese/url_io/url_request.h ('k') | experimental/flocking_geese/url_io/web_resource_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698