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

Unified Diff: webkit/glue/webkit_glue.h

Issue 7922023: Remove webkit_glue::BuildUserAgent(), remove windows spoofing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to r102225 Created 9 years, 3 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 54cfdc1f29aaa9099f33b0dddb42cb704e4c88a4..37a56a466e1d86fb49d16883860bb237a0d1039b 100644
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -88,14 +88,14 @@ string16 DumpFrameScrollPosition(WebKit::WebFrame* web_frame, bool recursive);
string16 DumpHistoryState(const std::string& history_state, int indent,
bool is_current);
-// Called to override the default user agent with a custom one. Call this
-// before anyone actually asks for the user agent in order to prevent
-// inconsistent behavior.
-void SetUserAgent(const std::string& new_user_agent);
-
-// Returns the user agent to use for the given URL, which is usually the
-// default user agent but may be overriden by a call to SetUserAgent() (which
-// should be done at startup).
+// 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.
+void SetUserAgent(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);
// Creates serialized state for the specified URL. This is a variant of
@@ -147,10 +147,6 @@ WebKit::WebCanvas* ToWebCanvas(skia::PlatformCanvas*);
// used to get memory usage statistics.
int GetGlyphPageCount();
-// Construct the User-Agent header, filling in |result|.
-// - If mimic_windows is true, produce a fake Windows Chrome string.
-std::string BuildUserAgent(bool mimic_windows);
-
//---- END FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE -------------------------------

Powered by Google App Engine
This is Rietveld 408576698