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

Side by Side Diff: chrome_frame/protocol_sink_wrap.cc

Issue 112433004: Update uses of UTF conversions in chrome_frame/, chromeos/, components/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/policy_settings.cc ('k') | chrome_frame/simple_resource_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <htiframe.h> 5 #include <htiframe.h>
6 #include <mshtml.h> 6 #include <mshtml.h>
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome_frame/protocol_sink_wrap.h" 9 #include "chrome_frame/protocol_sink_wrap.h"
10 10
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 return RENDERER_TYPE_OTHER; 314 return RENDERER_TYPE_OTHER;
315 } 315 }
316 316
317 RendererType DetermineRendererType(void* buffer, DWORD size, bool last_chance) { 317 RendererType DetermineRendererType(void* buffer, DWORD size, bool last_chance) {
318 RendererType renderer_type = RENDERER_TYPE_UNDETERMINED; 318 RendererType renderer_type = RENDERER_TYPE_UNDETERMINED;
319 if (last_chance) 319 if (last_chance)
320 renderer_type = RENDERER_TYPE_OTHER; 320 renderer_type = RENDERER_TYPE_OTHER;
321 321
322 std::wstring html_contents; 322 std::wstring html_contents;
323 // TODO(joshia): detect and handle different content encodings 323 // TODO(joshia): detect and handle different content encodings
324 UTF8ToWide(reinterpret_cast<char*>(buffer), size, &html_contents); 324 base::UTF8ToWide(reinterpret_cast<char*>(buffer), size, &html_contents);
325 325
326 // Note that document_contents_ may have NULL characters in it. While 326 // Note that document_contents_ may have NULL characters in it. While
327 // browsers may handle this properly, we don't and will stop scanning 327 // browsers may handle this properly, we don't and will stop scanning
328 // for the XUACompat content value if we encounter one. 328 // for the XUACompat content value if we encounter one.
329 std::wstring xua_compat_content; 329 std::wstring xua_compat_content;
330 if (SUCCEEDED(UtilGetXUACompatContentValue(html_contents, 330 if (SUCCEEDED(UtilGetXUACompatContentValue(html_contents,
331 &xua_compat_content))) { 331 &xua_compat_content))) {
332 if (CheckXUaCompatibleDirective(WideToASCII(xua_compat_content), 332 if (CheckXUaCompatibleDirective(WideToASCII(xua_compat_content),
333 GetIEMajorVersion())) { 333 GetIEMajorVersion())) {
334 renderer_type = RENDERER_TYPE_CHROME_HTTP_EQUIV; 334 renderer_type = RENDERER_TYPE_CHROME_HTTP_EQUIV;
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 // Explicit release, otherwise ~CComObjectStackEx will complain about 1001 // Explicit release, otherwise ~CComObjectStackEx will complain about
1002 // outstanding reference to us, because it runs before ~FakeProtocol 1002 // outstanding reference to us, because it runs before ~FakeProtocol
1003 prot.transaction_.Release(); 1003 prot.transaction_.Release();
1004 } 1004 }
1005 } 1005 }
1006 1006
1007 void TransactionHooks::RevertHooks() { 1007 void TransactionHooks::RevertHooks() {
1008 vtable_patch::UnpatchInterfaceMethods(CTransaction_PatchInfo); 1008 vtable_patch::UnpatchInterfaceMethods(CTransaction_PatchInfo);
1009 vtable_patch::UnpatchInterfaceMethods(CTransaction2_PatchInfo); 1009 vtable_patch::UnpatchInterfaceMethods(CTransaction2_PatchInfo);
1010 } 1010 }
OLDNEW
« no previous file with comments | « chrome_frame/policy_settings.cc ('k') | chrome_frame/simple_resource_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698