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

Unified Diff: ios/crnet/crnet_environment.h

Issue 2206283003: [Cronet] Add CrNet.setUserAgent method on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@crnetgn
Patch Set: Unmark setPartialUserAgent as deprecated. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/crnet/CrNet.mm ('k') | ios/crnet/crnet_environment.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/crnet/crnet_environment.h
diff --git a/ios/crnet/crnet_environment.h b/ios/crnet/crnet_environment.h
index 34dd2f8f5d7a41e9e18616ebbdf66bd0e6aebd76..e16da23273b26ffb596bea6339697f0939de9539 100644
--- a/ios/crnet/crnet_environment.h
+++ b/ios/crnet/crnet_environment.h
@@ -39,8 +39,9 @@ class CrNetEnvironment {
// Must be called on the main thread.
static void Initialize();
- // |user_agent_product_name| will be used to generate the user-agent.
- CrNetEnvironment(const std::string& user_agent_product_name);
+ // If |user_agent_partial| is true, then |user_agent| will be used to
+ // generate the user-agent, otherwise it will be used directly.
+ CrNetEnvironment(const std::string& user_agent, bool user_agent_partial);
~CrNetEnvironment();
// Installs this CrNet environment so requests are intercepted.
@@ -156,7 +157,8 @@ class CrNetEnvironment {
std::unique_ptr<net::URLRequestContext> main_context_;
std::unique_ptr<CrNetHttpProtocolHandlerDelegate>
http_protocol_handler_delegate_;
- std::string user_agent_product_name_;
+ std::string user_agent_;
+ bool user_agent_partial_;
std::unique_ptr<net::NetLog> net_log_;
std::unique_ptr<net::WriteToFileNetLogObserver> net_log_observer_;
« no previous file with comments | « ios/crnet/CrNet.mm ('k') | ios/crnet/crnet_environment.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698