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

Side by Side Diff: chrome_frame/protocol_sink_wrap.cc

Issue 5581008: Add a new GetInstance() method for singleton classes, take 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 7
8 #include "chrome_frame/protocol_sink_wrap.h" 8 #include "chrome_frame/protocol_sink_wrap.h"
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 "video/webm", 225 "video/webm",
226 "video/mp4" 226 "video/mp4"
227 }; 227 };
228 228
229 const std::wstring str = status_text; 229 const std::wstring str = status_text;
230 for (int i = 0; i < arraysize(kHeaderContentTypes); ++i) { 230 for (int i = 0; i < arraysize(kHeaderContentTypes); ++i) {
231 if (LowerCaseEqualsASCII(str, kHeaderContentTypes[i])) 231 if (LowerCaseEqualsASCII(str, kHeaderContentTypes[i]))
232 return true; 232 return true;
233 } 233 }
234 234
235 Singleton<PolicySettings> policy; 235 if (PolicySettings::GetInstance()->GetRendererForContentType(
236 if (policy->GetRendererForContentType(status_text) == 236 status_text) == PolicySettings::RENDER_IN_CHROME_FRAME) {
237 PolicySettings::RENDER_IN_CHROME_FRAME) {
238 return true; 237 return true;
239 } 238 }
240 239
241 return false; 240 return false;
242 } 241 }
243 242
244 // Returns: 243 // Returns:
245 // RENDERER_TYPE_OTHER: if suggested mime type is not text/html. 244 // RENDERER_TYPE_OTHER: if suggested mime type is not text/html.
246 // RENDERER_TYPE_UNDETERMINED: if suggested mime type is text/html. 245 // RENDERER_TYPE_UNDETERMINED: if suggested mime type is text/html.
247 // RENDERER_TYPE_CHROME_RESPONSE_HEADER: X-UA-Compatible tag is in HTTP headers. 246 // RENDERER_TYPE_CHROME_RESPONSE_HEADER: X-UA-Compatible tag is in HTTP headers.
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 // Explicit release, otherwise ~CComObjectStackEx will complain about 927 // Explicit release, otherwise ~CComObjectStackEx will complain about
929 // outstanding reference to us, because it runs before ~FakeProtocol 928 // outstanding reference to us, because it runs before ~FakeProtocol
930 prot.transaction_.Release(); 929 prot.transaction_.Release();
931 } 930 }
932 } 931 }
933 932
934 void TransactionHooks::RevertHooks() { 933 void TransactionHooks::RevertHooks() {
935 vtable_patch::UnpatchInterfaceMethods(CTransaction_PatchInfo); 934 vtable_patch::UnpatchInterfaceMethods(CTransaction_PatchInfo);
936 vtable_patch::UnpatchInterfaceMethods(CTransaction2_PatchInfo); 935 vtable_patch::UnpatchInterfaceMethods(CTransaction2_PatchInfo);
937 } 936 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698