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

Unified Diff: chrome_frame/utils.h

Issue 9720001: Add a setting to CF to remove 'chromeframe' from the UserAgent on a per-pattern basis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor tweak to UA building. Created 8 years, 9 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: chrome_frame/utils.h
diff --git a/chrome_frame/utils.h b/chrome_frame/utils.h
index b3899c380612d5d31b2b63d0c7c7675afb95bcd0..a29cb2861ea2f500a4232b7bd9fe7a697a8fb448 100644
--- a/chrome_frame/utils.h
+++ b/chrome_frame/utils.h
@@ -15,6 +15,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
+#include "base/string16.h"
#include "base/threading/thread.h"
#include "base/win/scoped_comptr.h"
#include "googleurl/src/gurl.h"
@@ -26,22 +27,23 @@ interface IWebBrowser2;
struct ContextMenuModel;
// utils.h : Various utility functions and classes
+extern const char kGCFProtocol[];
+extern const wchar_t kAllowUnsafeURLs[];
extern const wchar_t kChromeContentPrefix[];
-extern const char kGCFProtocol[];
-extern const wchar_t kChromeProtocolPrefix[];
-extern const wchar_t kChromeFrameHeadlessMode[];
extern const wchar_t kChromeFrameAccessibleMode[];
-extern const wchar_t kChromeFrameUnpinnedMode[];
-extern const wchar_t kAllowUnsafeURLs[];
-extern const wchar_t kEnableBuggyBhoIntercept[];
-extern const wchar_t kChromeMimeType[];
extern const wchar_t kChromeFrameAttachTabPattern[];
extern const wchar_t kChromeFrameConfigKey[];
-extern const wchar_t kRenderInGCFUrlList[];
-extern const wchar_t kRenderInHostUrlList[];
+extern const wchar_t kChromeFrameHeadlessMode[];
+extern const wchar_t kChromeFrameUnpinnedMode[];
+extern const wchar_t kChromeMimeType[];
+extern const wchar_t kChromeProtocolPrefix[];
+extern const wchar_t kEnableBuggyBhoIntercept[];
extern const wchar_t kEnableGCFRendererByDefault[];
+extern const wchar_t kExcludeUAFromDomainList[];
extern const wchar_t kIexploreProfileName[];
+extern const wchar_t kRenderInGCFUrlList[];
+extern const wchar_t kRenderInHostUrlList[];
extern const wchar_t kRundllProfileName[];
extern const wchar_t kUseBackgroundThreadForSubResources[];
@@ -184,6 +186,11 @@ enum RendererType {
RENDERER_TYPE_OTHER,
};
+enum UserAgentAction {
+ USER_AGENT_DEFAULT,
+ USER_AGENT_REMOVE
+};
+
// Returns true if the given RendererType represents Chrome.
bool IsChrome(RendererType renderer_type);
@@ -272,6 +279,10 @@ bool IsGcfDefaultRenderer();
// - RENDERER_TYPE_CHROME_OPT_IN_URL
RendererType RendererTypeForUrl(const std::wstring& url);
+// Check if we should try to remove the CF user agent based on registry
+// settings.
+UserAgentAction ShouldRemoveUAForUrl(const string16& url);
grt (UTC plus 2) 2012/03/20 17:27:45 since there are only two options and the function
robertshield 2012/03/26 02:43:33 Done.
+
// A shortcut for QueryService
template <typename T>
HRESULT DoQueryService(const IID& service_id, IUnknown* unk, T** service) {

Powered by Google App Engine
This is Rietveld 408576698