Chromium Code Reviews| 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); |