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

Side by Side Diff: components/cronet/url_request_context_config.h

Issue 586143002: Initial implementation of Cronet Async API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 6 years, 1 month 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ 5 #ifndef COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
6 #define COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ 6 #define COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/json/json_value_converter.h" 10 #include "base/json/json_value_converter.h"
(...skipping 25 matching lines...) Expand all
36 // Alternate protocol port. 36 // Alternate protocol port.
37 int alternate_port; 37 int alternate_port;
38 38
39 private: 39 private:
40 DISALLOW_COPY_AND_ASSIGN(QuicHint); 40 DISALLOW_COPY_AND_ASSIGN(QuicHint);
41 }; 41 };
42 42
43 URLRequestContextConfig(); 43 URLRequestContextConfig();
44 ~URLRequestContextConfig(); 44 ~URLRequestContextConfig();
45 45
46 // Load config values from JSON format.
47 bool LoadFromJSON(const std::string& config_string);
48
46 // Configure |context_builder| based on |this|. 49 // Configure |context_builder| based on |this|.
47 void ConfigureURLRequestContextBuilder( 50 void ConfigureURLRequestContextBuilder(
48 net::URLRequestContextBuilder* context_builder); 51 net::URLRequestContextBuilder* context_builder);
49 52
50 // Register |converter| for use in converter.Convert(). 53 // Register |converter| for use in converter.Convert().
51 static void RegisterJSONConverter( 54 static void RegisterJSONConverter(
52 base::JSONValueConverter<URLRequestContextConfig>* converter); 55 base::JSONValueConverter<URLRequestContextConfig>* converter);
53 56
54 // Enable QUIC. 57 // Enable QUIC.
55 bool enable_quic; 58 bool enable_quic;
56 // Enable SPDY. 59 // Enable SPDY.
57 bool enable_spdy; 60 bool enable_spdy;
58 // Type of http cache: "HTTP_CACHE_DISABLED", "HTTP_CACHE_DISK" or 61 // Type of http cache: "HTTP_CACHE_DISABLED", "HTTP_CACHE_DISK" or
59 // "HTTP_CACHE_IN_MEMORY". 62 // "HTTP_CACHE_IN_MEMORY".
60 std::string http_cache; 63 std::string http_cache;
61 // Max size of http cache in bytes. 64 // Max size of http cache in bytes.
62 int http_cache_max_size; 65 int http_cache_max_size;
63 // Storage path for http cache and cookie storage. 66 // Storage path for http cache and cookie storage.
64 std::string storage_path; 67 std::string storage_path;
68 // User-Agent request header field.
69 std::string user_agent;
65 // App-provided list of servers that support QUIC. 70 // App-provided list of servers that support QUIC.
66 ScopedVector<QuicHint> quic_hints; 71 ScopedVector<QuicHint> quic_hints;
67 72
68 private: 73 private:
69 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig); 74 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig);
70 }; 75 };
71 76
72 } // namespace cronet 77 } // namespace cronet
73 78
74 #endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ 79 #endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698