OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome_frame/bho.h" | 5 #include "chrome_frame/bho.h" |
6 | 6 |
7 #include <shlguid.h> | 7 #include <shlguid.h> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 #ifndef NDEBUG | 295 #ifndef NDEBUG |
296 // This check must already have been made. | 296 // This check must already have been made. |
297 VARIANT_BOOL is_top_level = VARIANT_FALSE; | 297 VARIANT_BOOL is_top_level = VARIANT_FALSE; |
298 browser->get_TopLevelContainer(&is_top_level); | 298 browser->get_TopLevelContainer(&is_top_level); |
299 DCHECK(is_top_level); | 299 DCHECK(is_top_level); |
300 #endif | 300 #endif |
301 | 301 |
302 std::wstring current_url(url, SysStringLen(url)); | 302 std::wstring current_url(url, SysStringLen(url)); |
303 if (IsValidUrlScheme(GURL(current_url), false)) { | 303 if (IsValidUrlScheme(GURL(current_url), false)) { |
304 bool cf_protocol = StartsWith(current_url, kChromeProtocolPrefix, false); | 304 bool cf_protocol = StartsWith(current_url, kChromeProtocolPrefix, false); |
305 if (!cf_protocol && IsOptInUrl(current_url.c_str())) { | 305 if (!cf_protocol && IsChrome(RendererTypeForUrl(current_url))) { |
306 DLOG(INFO) << "Opt-in URL. Switching to cf."; | 306 DLOG(INFO) << "Opt-in URL. Switching to cf."; |
307 ScopedComPtr<IBrowserService> browser_service; | 307 ScopedComPtr<IBrowserService> browser_service; |
308 DoQueryService(SID_SShellBrowser, browser, browser_service.Receive()); | 308 DoQueryService(SID_SShellBrowser, browser, browser_service.Receive()); |
309 DCHECK(browser_service) << "DoQueryService - SID_SShellBrowser failed."; | 309 DCHECK(browser_service) << "DoQueryService - SID_SShellBrowser failed."; |
310 MarkBrowserOnThreadForCFNavigation(browser_service); | 310 MarkBrowserOnThreadForCFNavigation(browser_service); |
311 } | 311 } |
312 } | 312 } |
313 } | 313 } |
314 | 314 |
315 bool PatchHelper::InitializeAndPatchProtocolsIfNeeded() { | 315 bool PatchHelper::InitializeAndPatchProtocolsIfNeeded() { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } else if (state_ == PATCH_IBROWSER) { | 354 } else if (state_ == PATCH_IBROWSER) { |
355 vtable_patch::UnpatchInterfaceMethods(IBrowserService_PatchInfo); | 355 vtable_patch::UnpatchInterfaceMethods(IBrowserService_PatchInfo); |
356 MonikerPatch::Uninitialize(); | 356 MonikerPatch::Uninitialize(); |
357 HttpNegotiatePatch::Uninitialize(); | 357 HttpNegotiatePatch::Uninitialize(); |
358 } else { | 358 } else { |
359 HttpNegotiatePatch::Uninitialize(); | 359 HttpNegotiatePatch::Uninitialize(); |
360 } | 360 } |
361 | 361 |
362 state_ = UNKNOWN; | 362 state_ = UNKNOWN; |
363 } | 363 } |
OLD | NEW |