| Index: components/grpc_support/environment.h
|
| diff --git a/components/grpc_support/environment.h b/components/grpc_support/environment.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..74e0722f8dde43653682d429897a9ac4da4bf323
|
| --- /dev/null
|
| +++ b/components/grpc_support/environment.h
|
| @@ -0,0 +1,31 @@
|
| +// Copyright 2016 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 COMPONENTS_GRPC_SUPPORT_ENVIRONMENT_H_
|
| +#define COMPONENTS_GRPC_SUPPORT_ENVIRONMENT_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/callback.h"
|
| +#include "base/tracked_objects.h"
|
| +
|
| +namespace net {
|
| +class URLRequestContext;
|
| +}
|
| +
|
| +namespace grpc_support {
|
| +
|
| +// Abstract base class for gRPC environment.
|
| +class Environment {
|
| + public:
|
| + virtual bool IsOnNetworkThread() = 0;
|
| + virtual void PostToNetworkThread(const tracked_objects::Location& from_here,
|
| + const base::Closure& task) = 0;
|
| + virtual net::URLRequestContext* GetURLRequestContext() const = 0;
|
| + virtual std::string UserAgent() = 0;
|
| +};
|
| +
|
| +} // namespace grpc_support
|
| +
|
| +#endif // COMPONENTS_GRPC_SUPPORT_ENVIRONMENT_H_
|
|
|