summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/glue/http_bridge.cc
diff options
context:
space:
mode:
authorchron@chromium.org <chron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-21 22:27:30 +0000
committerchron@chromium.org <chron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-21 22:27:30 +0000
commit255790a7a6c27dc4c00dd43c578fc39e179a6b1f (patch)
tree42c476cc68b4eed43c32ac6a3edb5ba2c9588f45 /chrome/browser/sync/glue/http_bridge.cc
parentd21fb774bbd1498cc392d9636338660b58f2ac72 (diff)
downloadchromium_src-255790a7a6c27dc4c00dd43c578fc39e179a6b1f.zip
chromium_src-255790a7a6c27dc4c00dd43c578fc39e179a6b1f.tar.gz
chromium_src-255790a7a6c27dc4c00dd43c578fc39e179a6b1f.tar.bz2
For bookmark sync, remove cookie support from http bridge and syncapi.
Cookies are problematic for the sync client and no longer necessary. This code is no longer used. Review URL: http://codereview.chromium.org/208036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26752 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/glue/http_bridge.cc')
-rw-r--r--chrome/browser/sync/glue/http_bridge.cc41
1 files changed, 0 insertions, 41 deletions
diff --git a/chrome/browser/sync/glue/http_bridge.cc b/chrome/browser/sync/glue/http_bridge.cc
index 54e93ed..304f91e 100644
--- a/chrome/browser/sync/glue/http_bridge.cc
+++ b/chrome/browser/sync/glue/http_bridge.cc
@@ -143,19 +143,6 @@ void HttpBridge::SetPostPayload(const char* content_type,
}
}
-void HttpBridge::AddCookieForRequest(const char* cookie) {
- DCHECK_EQ(MessageLoop::current(), created_on_loop_);
- DCHECK(!request_completed_);
- DCHECK(url_for_request_.is_valid()) << "Valid URL not set.";
- if (!url_for_request_.is_valid()) return;
-
- if (!context_for_request_->cookie_store()->SetCookie(url_for_request_,
- cookie)) {
- DLOG(WARNING) << "Cookie " << cookie
- << " could not be added for url: " << url_for_request_ << ".";
- }
-}
-
bool HttpBridge::MakeSynchronousPost(int* os_error_code, int* response_code) {
DCHECK_EQ(MessageLoop::current(), created_on_loop_);
DCHECK(!request_completed_);
@@ -202,23 +189,6 @@ const char* HttpBridge::GetResponseContent() const {
return response_content_.data();
}
-int HttpBridge::GetResponseCookieCount() const {
- DCHECK_EQ(MessageLoop::current(), created_on_loop_);
- DCHECK(request_completed_);
- return response_cookies_.size();
-}
-
-const char* HttpBridge::GetResponseCookieAt(int cookie_number) const {
- DCHECK_EQ(MessageLoop::current(), created_on_loop_);
- DCHECK(request_completed_);
- bool valid_number = (cookie_number >= 0) &&
- (static_cast<size_t>(cookie_number) < response_cookies_.size());
- DCHECK(valid_number);
- if (!valid_number)
- return NULL;
- return response_cookies_[cookie_number].c_str();
-}
-
void HttpBridge::OnURLFetchComplete(const URLFetcher *source, const GURL &url,
const URLRequestStatus &status,
int response_code,
@@ -231,17 +201,6 @@ void HttpBridge::OnURLFetchComplete(const URLFetcher *source, const GURL &url,
http_response_code_ = response_code;
os_error_code_ = status.os_error();
- // TODO(timsteele): For now we need this "fixup" to match up with what the
- // sync backend expects. This seems to be non-standard and shouldn't be done
- // here in HttpBridge, and it breaks part of the unittest.
- for (size_t i = 0; i < cookies.size(); ++i) {
- net::CookieMonster::ParsedCookie parsed_cookie(cookies[i]);
- std::string cookie = " \t \t \t \t \t";
- cookie += parsed_cookie.Name() + "\t";
- cookie += parsed_cookie.Value();
- response_cookies_.push_back(cookie);
- }
-
response_content_ = data;
// End of the line for url_poster_. It lives only on the io_loop.