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

Unified Diff: webkit/glue/webkit_glue.h

Issue 8296011: Make setting the user agent work with the zygote on linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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
Index: webkit/glue/webkit_glue.h
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h
index 37a9c600671c68bc80c7cc1a929c5cae2d4736c7..cd15e0aaeb77ef89960f074d5e54e305fae0d95b 100644
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -91,9 +91,15 @@ string16 DumpHistoryState(const std::string& history_state, int indent,
// Sets the user agent. Pass true for overriding if this is a custom
// user agent instead of the default one (in order to turn off any browser
// sniffing workarounds). This must be called before GetUserAgent() can
-// be called.
+// be called, and must not be called after GetUserAgent() with a different
+// value (use ResetUserAgent() for that, if necessary).
void SetUserAgent(const std::string& user_agent, bool overriding);
+// Like SetUserAgent(), but can be used to forcibly change the user agent
+// (disabling the checks that ensure that GetUserAgent() hasn't already
+// been called).
jam 2011/10/15 01:32:04 it seems a little redundant to provide two methods
Dirk Pranke 2011/10/15 02:14:07 Well, Reset() should really only be called in exte
jam 2011/10/17 03:43:23 sure, if you can find one place that calls this an
+void ResetUserAgent(const std::string& user_agent, bool overriding);
+
// Returns the user agent to use for the given URL. SetUserAgent() must
// be called prior to calling this function.
const std::string& GetUserAgent(const GURL& url);

Powered by Google App Engine
This is Rietveld 408576698