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

Side by Side Diff: components/grpc_support/environment.h

Issue 2273403003: Moving gRPC support interfaces out of cronet and into a new component. (Closed)
Patch Set: Add cronet_c_for_graph back to sources. Might fix GN, probably won't compile Created 4 years, 3 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698