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

Unified Diff: trunk/src/sync/test/fake_server/fake_server_http_post_provider.h

Issue 130503007: Revert 245326 "Basic implementation of the Sync C++ fake server" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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: trunk/src/sync/test/fake_server/fake_server_http_post_provider.h
===================================================================
--- trunk/src/sync/test/fake_server/fake_server_http_post_provider.h (revision 245340)
+++ trunk/src/sync/test/fake_server/fake_server_http_post_provider.h (working copy)
@@ -1,71 +0,0 @@
-// Copyright 2014 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 SYNC_TEST_FAKE_SERVER_FAKE_SERVER_HTTP_POST_PROVIDER_H_
-#define SYNC_TEST_FAKE_SERVER_FAKE_SERVER_HTTP_POST_PROVIDER_H_
-
-#include <string>
-
-#include "base/memory/ref_counted.h"
-#include "sync/internal_api/public/http_post_provider_factory.h"
-#include "sync/internal_api/public/http_post_provider_interface.h"
-
-namespace syncer {
-
-class FakeServer;
-
-class FakeServerHttpPostProvider
- : public HttpPostProviderInterface,
- public base::RefCountedThreadSafe<FakeServerHttpPostProvider> {
- public:
- FakeServerHttpPostProvider(FakeServer* fake_server);
-
- // HttpPostProviderInterface implementation.
- virtual void SetExtraRequestHeaders(const char* headers) OVERRIDE;
- virtual void SetURL(const char* url, int port) OVERRIDE;
- virtual void SetPostPayload(const char* content_type, int content_length,
- const char* content) OVERRIDE;
- virtual bool MakeSynchronousPost(int* error_code,
- int* response_code) OVERRIDE;
- virtual void Abort() OVERRIDE;
- virtual int GetResponseContentLength() const OVERRIDE;
- virtual const char* GetResponseContent() const OVERRIDE;
- virtual const std::string GetResponseHeaderValue(
- const std::string& name) const OVERRIDE;
-
- protected:
- friend class base::RefCountedThreadSafe<FakeServerHttpPostProvider>;
- virtual ~FakeServerHttpPostProvider();
-
- private:
- FakeServer* const fake_server_;
- std::string response_;
- std::string request_url_;
- int request_port_;
- std::string request_content_;
- std::string request_content_type_;
- std::string extra_request_headers_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeServerHttpPostProvider);
-};
-
-class FakeServerHttpPostProviderFactory : public HttpPostProviderFactory {
- public:
- FakeServerHttpPostProviderFactory(FakeServer* fake_server);
- virtual ~FakeServerHttpPostProviderFactory();
-
- // HttpPostProviderFactory:
- virtual void Init(const std::string& user_agent) OVERRIDE;
- virtual HttpPostProviderInterface* Create() OVERRIDE;
- virtual void Destroy(HttpPostProviderInterface* http) OVERRIDE;
-
- private:
- FakeServer* const fake_server_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeServerHttpPostProviderFactory);
-};
-
-} // namespace syncer
-
-#endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_HTTP_POST_PROVIDER_H_
« no previous file with comments | « trunk/src/sync/test/fake_server/fake_server.cc ('k') | trunk/src/sync/test/fake_server/fake_server_http_post_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698