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

Unified Diff: chrome_frame/http_negotiate.h

Issue 259025: Add the chromeframe tag to the user agent header at runtime instead of static... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/html_utils.cc ('k') | chrome_frame/http_negotiate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/http_negotiate.h
===================================================================
--- chrome_frame/http_negotiate.h (revision 0)
+++ chrome_frame/http_negotiate.h (revision 0)
@@ -0,0 +1,47 @@
+// Copyright (c) 2009 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.
+
+#ifndef CHROME_FRAME_HTTP_NEGOTIATE_H_
+#define CHROME_FRAME_HTTP_NEGOTIATE_H_
+
+#include <urlmon.h>
+
+#include "base/basictypes.h"
+
+// Typedefs for IHttpNegotiate methods.
+typedef HRESULT (STDMETHODCALLTYPE* IHttpNegotiate_BeginningTransaction_Fn)(
+ IHttpNegotiate* me, LPCWSTR url, LPCWSTR headers, DWORD reserved,
+ LPWSTR* additional_headers);
+typedef HRESULT (STDMETHODCALLTYPE* IHttpNegotiate_OnResponse_Fn)(
+ IHttpNegotiate* me, DWORD response_code, LPCWSTR response_header,
+ LPCWSTR request_header, LPWSTR* additional_request_headers);
+
+// Patches methods of urlmon's IHttpNegotiate implementation for the purposes
+// of adding to the http user agent header.
+class HttpNegotiatePatch {
+ // class is not to be instantiated atm.
+ HttpNegotiatePatch();
+ ~HttpNegotiatePatch();
+
+ public:
+ static bool Initialize();
+ static void Uninitialize();
+
+ static STDMETHODIMP BeginningTransaction(
+ IHttpNegotiate_BeginningTransaction_Fn original, IHttpNegotiate* me,
+ LPCWSTR url, LPCWSTR headers, DWORD reserved, LPWSTR* additional_headers);
+
+ static STDMETHODIMP OnResponse(
+ IHttpNegotiate_OnResponse_Fn original, IHttpNegotiate* me,
+ DWORD response_code, LPCWSTR response_header, LPCWSTR request_header,
+ LPWSTR* additional_request_headers);
+
+ protected:
+ static HRESULT PatchHttpNegotiate(IUnknown* to_patch);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(HttpNegotiatePatch);
+};
+
+#endif // CHROME_FRAME_HTTP_NEGOTIATE_H_
Property changes on: chrome_frame\http_negotiate.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome_frame/html_utils.cc ('k') | chrome_frame/http_negotiate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698