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

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: In the end. 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
« no previous file with comments | « chrome_frame/test/util_unittests.cc ('k') | chrome_frame/utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/utils.h
diff --git a/chrome_frame/utils.h b/chrome_frame/utils.h
index b3899c380612d5d31b2b63d0c7c7675afb95bcd0..d9f65804c467d4a5a5098c87cf05099794cf822f 100644
--- a/chrome_frame/utils.h
+++ b/chrome_frame/utils.h
@@ -15,33 +15,36 @@
#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"
#include "ui/gfx/rect.h"
class FilePath;
+class RegistryListPreferencesHolder;
interface IBrowserService;
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[];
@@ -272,6 +275,18 @@ 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.
+bool ShouldRemoveUAForUrl(const string16& url);
+
+// Testing methods that return the backing stores behind RendererTypeForUrl and
+// ShouldRemoveUAForUrl. Intended to allow unit testing code that calls the
+// above methods.
+// TODO(robertshield): All of the FooForUrl code should be removed from here
+// and further refactored.
+RegistryListPreferencesHolder& GetRendererTypePreferencesHolderForTesting();
+RegistryListPreferencesHolder& GetUserAgentPreferencesHolderForTesting();
+
// A shortcut for QueryService
template <typename T>
HRESULT DoQueryService(const IID& service_id, IUnknown* unk, T** service) {
« no previous file with comments | « chrome_frame/test/util_unittests.cc ('k') | chrome_frame/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698