diff options
author | pvalenzuela@chromium.org <pvalenzuela@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-13 20:02:59 +0000 |
---|---|---|
committer | pvalenzuela@chromium.org <pvalenzuela@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-13 20:02:59 +0000 |
commit | 32cf80b1fc2c71de91ff9375e793dcf5a9b278fa (patch) | |
tree | df732090564c4178eaefffa231146b0f25628a2c /sync/test/accounts_client/url_request_context_getter.h | |
parent | c882426bb7f624280b9984420d023c4041b4c1d3 (diff) | |
download | chromium_src-32cf80b1fc2c71de91ff9375e793dcf5a9b278fa.zip chromium_src-32cf80b1fc2c71de91ff9375e793dcf5a9b278fa.tar.gz chromium_src-32cf80b1fc2c71de91ff9375e793dcf5a9b278fa.tar.bz2 |
Initial version of Test Accounts service client (attempt #2)
This version uses URLFetcher instead of curl.
Original description (committed/reverted r198019):
"""
Initial version of Test Accounts service client. This client will
allow Chrome Sync tests to utilize the upcoming Test Accounts
service that allows short-term, exclusive access to test accounts
for the purpose of testing against real servers.
"""
BUG=
Review URL: https://chromiumcodereview.appspot.com/14591008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199805 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/test/accounts_client/url_request_context_getter.h')
-rw-r--r-- | sync/test/accounts_client/url_request_context_getter.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/sync/test/accounts_client/url_request_context_getter.h b/sync/test/accounts_client/url_request_context_getter.h new file mode 100644 index 0000000..6891072 --- /dev/null +++ b/sync/test/accounts_client/url_request_context_getter.h @@ -0,0 +1,43 @@ +// 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 SYNC_TEST_ACCOUNTS_CLIENT_URL_REQUEST_CONTEXT_GETTER_H_ +#define SYNC_TEST_ACCOUNTS_CLIENT_URL_REQUEST_CONTEXT_GETTER_H_ + +#include "base/basictypes.h" +#include "base/compiler_specific.h" +#include "base/memory/ref_counted.h" +#include "base/memory/scoped_ptr.h" +#include "net/url_request/url_request_context_getter.h" + +namespace base { +class SingleThreadTaskRunner; +} + +namespace net { +class URLRequestContext; +} + +class URLRequestContextGetter : public net::URLRequestContextGetter { + public: + explicit URLRequestContextGetter( + scoped_refptr<base::SingleThreadTaskRunner> network_task_runner); + + // Overridden from net::URLRequestContextGetter: + virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; + virtual scoped_refptr<base::SingleThreadTaskRunner> + GetNetworkTaskRunner() const OVERRIDE; + + private: + virtual ~URLRequestContextGetter(); + + scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; + + // Only accessed on the IO thread. + scoped_ptr<net::URLRequestContext> url_request_context_; + + DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter); +}; + +#endif // SYNC_TEST_ACCOUNTS_CLIENT_URL_REQUEST_CONTEXT_GETTER_H_ |