summaryrefslogtreecommitdiffstats
path: root/chrome_frame/html_utils.h
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 22:52:34 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 22:52:34 +0000
commit57319e14f7429ef47086acfa1acf1e7f75c956a7 (patch)
tree7c20eef391e725a52d47a17fb7446a2163afe330 /chrome_frame/html_utils.h
parentc1a9b640c320f20f6b797e103416195a14b2401d (diff)
downloadchromium_src-57319e14f7429ef47086acfa1acf1e7f75c956a7.zip
chromium_src-57319e14f7429ef47086acfa1acf1e7f75c956a7.tar.gz
chromium_src-57319e14f7429ef47086acfa1acf1e7f75c956a7.tar.bz2
Add a setting to CF to remove 'chromeframe' from the UserAgent on a per-pattern basis.
Useful for testing and dealing with sites with broken UA parsing. BUG=117157 TEST=chrome_frame_tests,chrome_frame_unittests,add a ExcludeUAFromDomain key to the CF settings, add some pattern values, observe that the UA string does not contain CF. Review URL: http://codereview.chromium.org/9720001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/html_utils.h')
-rw-r--r--chrome_frame/html_utils.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/chrome_frame/html_utils.h b/chrome_frame/html_utils.h
index 285bc63..54175b2 100644
--- a/chrome_frame/html_utils.h
+++ b/chrome_frame/html_utils.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -127,11 +127,16 @@ class HTMLScanner {
namespace http_utils {
-// Adds "chromeframe/x.y" to the end of the User-Agent string (x.y is the
-// version). If the cf tag has already been added to the string,
-// the original string is returned.
+// Adds "chromeframe/a.b.c.d" to the User-Agent string (a.b.c.d is the version).
+// If the cf tag has already been added to the string, the original string is
+// returned.
std::string AddChromeFrameToUserAgentValue(const std::string& value);
+// Removes "chromeframe/a.b.c.d" from the User-Agent string (a.b.c.d is the
+// version). If the cf tag is not present in the string, the original string is
+// returned.
+std::string RemoveChromeFrameFromUserAgentValue(const std::string& value);
+
// Fetches the user agent from urlmon and adds chrome frame to the
// comment section.
// NOTE: The returned string includes the "User-Agent: " header name.