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

Unified Diff: ios/crnet/CrNet.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 | « no previous file | ios/crnet/CrNet.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/crnet/CrNet.h
diff --git a/ios/crnet/CrNet.h b/ios/crnet/CrNet.h
index 0be9b7769e0e9db2f12176e64cadb09e68e807a1..ce93886ea1bab97955befae85a3fcc25abbb23be 100644
--- a/ios/crnet/CrNet.h
+++ b/ios/crnet/CrNet.h
@@ -36,12 +36,25 @@ __attribute__((visibility("default")))
+ (void)setSDCHEnabled:(BOOL)sdchEnabled
withPrefStore:(NSString *)filename;
-// |userAgent| is expected to be of the form Product/Version.
-// Example: Foo/3.0.0.0
-//
+// Set partial UserAgent. This function is a deprecated shortcut for:
+// [CrNet setUserAgent:userAgent partial:YES];
+// See the documentation for |setUserAgent| for details about the |userAgent|
+// argument.
// This method only has any effect before |install| is called.
+ (void)setPartialUserAgent:(NSString *)userAgent;
+// |userAgent| is expected to be the user agent value sent to remote.
+// If |partial| is set to YES, then actual user agent value is based on device
+// model, OS version, and |userAgent| argument. For example "Foo/3.0.0.0" is
+// sent as "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X)
+// AppleWebKit/601.1 (KHTML, like Gecko) Foo/3.0.0.0 Mobile/15G31
+// Safari/601.1.46".
+// If partial is set to NO, then |userAgent| value is complete value sent to
+// the remote. For Example: "Foo/3.0.0.0" is sent as "Foo/3.0.0.0".
+//
+// This method only has any effect before |install| is called.
++ (void)setUserAgent:(NSString*)userAgent partial:(bool)partial;
+
// Set the block used to determine whether or not CrNet should handle the
// request. If this is not set, CrNet will handle all requests.
// Must not be called while requests are in progress. This method can be called
« no previous file with comments | « no previous file | ios/crnet/CrNet.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698