| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_GRPC_SUPPORT_ENVIRONMENT_H_ |
| 6 #define COMPONENTS_GRPC_SUPPORT_ENVIRONMENT_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/callback.h" |
| 11 #include "base/tracked_objects.h" |
| 12 |
| 13 namespace net { |
| 14 class URLRequestContext; |
| 15 } |
| 16 |
| 17 namespace grpc_support { |
| 18 |
| 19 // Abstract base class for gRPC environment. |
| 20 class Environment { |
| 21 public: |
| 22 virtual bool IsOnNetworkThread() = 0; |
| 23 virtual void PostToNetworkThread(const tracked_objects::Location& from_here, |
| 24 const base::Closure& task) = 0; |
| 25 virtual net::URLRequestContext* GetURLRequestContext() const = 0; |
| 26 virtual std::string UserAgent() = 0; |
| 27 }; |
| 28 |
| 29 } // namespace grpc_support |
| 30 |
| 31 #endif // COMPONENTS_GRPC_SUPPORT_ENVIRONMENT_H_ |
| OLD | NEW |