diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-04 17:07:42 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-04 17:07:42 +0000 |
commit | 8a39b47ee588b1ddc3c2996b8e5c0f400e68c989 (patch) | |
tree | fede0e6391363a92860103f206659b9fe6ec7bdb /chrome/browser/custom_handlers | |
parent | 8bb46c251e7121e5eee3cb17e4fc3f2edc741462 (diff) | |
download | chromium_src-8a39b47ee588b1ddc3c2996b8e5c0f400e68c989.zip chromium_src-8a39b47ee588b1ddc3c2996b8e5c0f400e68c989.tar.gz chromium_src-8a39b47ee588b1ddc3c2996b8e5c0f400e68c989.tar.bz2 |
Cleanup: Get rid of Profile::GetProtocolHandlerRegistry().
Review URL: https://chromiumcodereview.appspot.com/13446007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192349 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/custom_handlers')
-rw-r--r-- | chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc index 6d12e4d..1a66a43 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc @@ -8,6 +8,7 @@ #include "base/string16.h" #include "base/utf_string_conversions.h" #include "chrome/app/chrome_command_ids.h" +#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" #include "chrome/browser/tab_contents/render_view_context_menu.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" @@ -72,7 +73,7 @@ class RegisterProtocolHandlerBrowserTest : public InProcessBrowserTest { ProtocolHandler handler = ProtocolHandler::CreateProtocolHandler( protocol, url, title); ProtocolHandlerRegistry* registry = - browser()->profile()->GetProtocolHandlerRegistry(); + ProtocolHandlerRegistryFactory::GetForProfile(browser()->profile()); // Fake that this registration is happening on profile startup. Otherwise // it'll try to register with the OS, which causes DCHECKs on Windows when // running as admin on Windows 7. @@ -81,7 +82,6 @@ class RegisterProtocolHandlerBrowserTest : public InProcessBrowserTest { registry->is_loading_ = false; ASSERT_TRUE(registry->IsHandledProtocol(protocol)); } - }; IN_PROC_BROWSER_TEST_F(RegisterProtocolHandlerBrowserTest, @@ -94,9 +94,9 @@ IN_PROC_BROWSER_TEST_F(RegisterProtocolHandlerBrowserTest, GURL("http://www.google.com/%s"), UTF8ToUTF16(std::string("Test handler"))); GURL url("web+search:testing"); - ASSERT_EQ(1u, - browser()->profile()->GetProtocolHandlerRegistry()->GetHandlersFor( - url.scheme()).size()); + ProtocolHandlerRegistry* registry = + ProtocolHandlerRegistryFactory::GetForProfile(browser()->profile()); + ASSERT_EQ(1u, registry->GetHandlersFor(url.scheme()).size()); menu.reset(CreateContextMenu(url)); ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKWITH)); } |