Lines Matching refs:registry

143       ProtocolHandlerRegistry* registry) OVERRIDE;
186 FakeClientObserver(ProtocolHandlerRegistry* registry,
188 : ProtocolHandlerRegistry::DefaultClientObserver(registry),
236 FakeDelegate::CreateShellObserver(ProtocolHandlerRegistry* registry) {
237 return new FakeClientObserver(registry, this);
273 ProtocolHandlerRegistry* registry)
274 : local_registry_(registry),
334 ProtocolHandlerRegistry* registry() { return registry_.get(); }
364 registry()->protocol_handlers_.begin();
365 for (; it != registry()->protocol_handlers_.end(); ++it)
379 registry()->ignored_protocol_handlers_.begin();
380 for (; it != registry()->ignored_protocol_handlers_.end(); ++it)
385 // Returns a new registry, initializing it if |initialize| is true.
456 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
457 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
458 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
463 registry()->OnDenyRegisterProtocolHandler(test_protocol_handler());
464 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
465 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
466 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
470 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
471 registry()->ClearDefault("test");
472 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
473 ASSERT_TRUE(registry()->GetHandlerFor("test").IsEmpty());
478 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
481 registry()->Disable();
483 registry()->Enable();
488 registry()->OnIgnoreRegisterProtocolHandler(test_protocol_handler());
489 ASSERT_TRUE(registry()->IsIgnored(test_protocol_handler()));
491 registry()->RemoveIgnoredHandler(test_protocol_handler());
492 ASSERT_FALSE(registry()->IsIgnored(test_protocol_handler()));
499 registry()->OnIgnoreRegisterProtocolHandler(ph1);
500 ASSERT_TRUE(registry()->IsIgnored(ph1));
501 ASSERT_TRUE(registry()->HasIgnoredEquivalent(ph2));
503 registry()->RemoveIgnoredHandler(ph1);
504 ASSERT_FALSE(registry()->IsIgnored(ph1));
505 ASSERT_FALSE(registry()->HasIgnoredEquivalent(ph2));
511 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
512 registry()->OnIgnoreRegisterProtocolHandler(stuff_protocol_handler);
514 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
515 ASSERT_TRUE(registry()->IsIgnored(stuff_protocol_handler));
518 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
519 ASSERT_TRUE(registry()->IsIgnored(stuff_protocol_handler));
523 registry()->Disable();
524 ASSERT_FALSE(registry()->enabled());
525 registry()->Enable();
526 ASSERT_TRUE(registry()->enabled());
532 ASSERT_FALSE(registry()->CanSchemeBeOverridden("test"));
536 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
537 ASSERT_TRUE(registry()->CanSchemeBeOverridden("test"));
538 registry()->RemoveHandler(test_protocol_handler());
539 ASSERT_TRUE(registry()->CanSchemeBeOverridden("test"));
543 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
544 ASSERT_TRUE(registry()->IsDefault(test_protocol_handler()));
550 registry()->OnAcceptRegisterProtocolHandler(ph1);
551 registry()->OnAcceptRegisterProtocolHandler(ph2);
553 registry()->OnAcceptRegisterProtocolHandler(ph1);
554 registry()->ClearDefault("test");
555 ASSERT_FALSE(registry()->IsDefault(ph1));
556 ASSERT_FALSE(registry()->IsDefault(ph2));
562 registry()->OnAcceptRegisterProtocolHandler(ph1);
563 registry()->OnAcceptRegisterProtocolHandler(ph2);
565 registry()->OnAcceptRegisterProtocolHandler(ph2);
566 ASSERT_EQ(ph2, registry()->GetHandlerFor("test"));
567 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
573 registry()->OnAcceptRegisterProtocolHandler(ph1);
574 registry()->OnAcceptRegisterProtocolHandler(ph2);
575 ASSERT_FALSE(registry()->IsDefault(ph1));
576 ASSERT_TRUE(registry()->IsDefault(ph2));
582 registry()->OnAcceptRegisterProtocolHandler(ph1);
583 registry()->OnAcceptRegisterProtocolHandler(ph2);
585 registry()->OnAcceptRegisterProtocolHandler(ph1);
586 ASSERT_TRUE(registry()->IsDefault(ph1));
587 ASSERT_FALSE(registry()->IsDefault(ph2));
589 registry()->OnAcceptRegisterProtocolHandler(ph2);
590 ASSERT_FALSE(registry()->IsDefault(ph1));
591 ASSERT_TRUE(registry()->IsDefault(ph2));
597 registry()->OnDenyRegisterProtocolHandler(ph1);
598 registry()->OnDenyRegisterProtocolHandler(ph2);
600 registry()->OnAcceptRegisterProtocolHandler(ph2);
601 registry()->Disable();
605 ASSERT_FALSE(registry()->enabled());
606 registry()->Enable();
607 ASSERT_FALSE(registry()->IsDefault(ph1));
608 ASSERT_TRUE(registry()->IsDefault(ph2));
611 ASSERT_TRUE(registry()->enabled());
616 registry()->OnAcceptRegisterProtocolHandler(ph1);
617 registry()->OnAcceptRegisterProtocolHandler(ph1);
619 registry()->RemoveHandler(ph1);
620 ASSERT_FALSE(registry()->IsRegistered(ph1));
621 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
627 registry()->OnAcceptRegisterProtocolHandler(ph1);
628 registry()->OnAcceptRegisterProtocolHandler(ph2);
630 ASSERT_TRUE(registry()->IsRegistered(ph1));
636 registry()->OnAcceptRegisterProtocolHandler(ph1);
638 ASSERT_TRUE(registry()->IsRegistered(ph1));
639 ASSERT_TRUE(registry()->HasRegisteredEquivalent(ph2));
648 ASSERT_FALSE(registry()->SilentlyHandleRegisterHandlerRequest(ph1));
649 ASSERT_FALSE(registry()->IsRegistered(ph1));
651 registry()->OnAcceptRegisterProtocolHandler(ph1);
652 ASSERT_TRUE(registry()->IsRegistered(ph1));
654 ASSERT_TRUE(registry()->SilentlyHandleRegisterHandlerRequest(ph2));
655 ASSERT_FALSE(registry()->IsRegistered(ph1));
656 ASSERT_TRUE(registry()->IsRegistered(ph2));
658 ASSERT_FALSE(registry()->SilentlyHandleRegisterHandlerRequest(ph3));
659 ASSERT_FALSE(registry()->IsRegistered(ph3));
661 registry()->OnIgnoreRegisterProtocolHandler(ph3);
662 ASSERT_FALSE(registry()->IsRegistered(ph3));
663 ASSERT_TRUE(registry()->IsIgnored(ph3));
665 ASSERT_TRUE(registry()->SilentlyHandleRegisterHandlerRequest(ph4));
666 ASSERT_FALSE(registry()->IsRegistered(ph4));
667 ASSERT_TRUE(registry()->HasIgnoredEquivalent(ph4));
675 registry()->OnAcceptRegisterProtocolHandler(ph1);
676 registry()->OnAcceptRegisterProtocolHandler(ph2);
677 registry()->OnAcceptRegisterProtocolHandler(ph3);
679 registry()->OnAcceptRegisterProtocolHandler(ph1);
680 registry()->RemoveHandler(ph1);
681 ASSERT_FALSE(registry()->IsDefault(ph1));
688 registry()->OnAcceptRegisterProtocolHandler(ph1);
689 registry()->OnAcceptRegisterProtocolHandler(ph2);
690 registry()->OnAcceptRegisterProtocolHandler(ph3);
693 registry()->GetHandlersFor("test");
703 registry()->GetRegisteredProtocols(&protocols);
706 registry()->GetHandlersFor("test");
709 registry()->GetRegisteredProtocols(&protocols);
714 registry()->GetHandlersFor("test");
715 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
722 registry()->OnAcceptRegisterProtocolHandler(ph1);
726 registry()->Disable();
730 registry()->Enable();
734 registry()->RemoveHandler(ph1);
740 QueryProtocolHandlerOnChange queryer(profile(), registry());
742 registry()->OnAcceptRegisterProtocolHandler(ph1);
748 registry()->OnAcceptRegisterProtocolHandler(ph1);
749 registry()->ClearDefault("test");
751 registry()->GetRegisteredProtocols(&handled_protocols);
758 registry()->OnAcceptRegisterProtocolHandler(ph1);
759 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
760 registry()->Disable();
761 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
776 registry()->OnAcceptRegisterProtocolHandler(ph_do1);
777 registry()->OnDenyRegisterProtocolHandler(ph_dont);
785 registry()->OnAcceptRegisterProtocolHandler(ph_do2);
804 ASSERT_FALSE(registry()->IsHandledProtocol("do"));
805 ASSERT_FALSE(registry()->IsHandledProtocol("dont"));
807 registry()->OnAcceptRegisterProtocolHandler(ph_do);
810 registry()->OnAcceptRegisterProtocolHandler(ph_dont);
812 ASSERT_TRUE(registry()->IsHandledProtocol("do"));
813 ASSERT_EQ(static_cast<size_t>(1), registry()->GetHandlersFor("do").size());
814 ASSERT_FALSE(registry()->IsHandledProtocol("dont"));
815 ASSERT_EQ(static_cast<size_t>(1), registry()->GetHandlersFor("dont").size());
820 registry()->OnAcceptRegisterProtocolHandler(ph1);
824 registry()->CreateJobInterceptorFactory());
832 registry()->OnAcceptRegisterProtocolHandler(ph1);
835 registry()->CreateJobInterceptorFactory());
843 registry()->OnAcceptRegisterProtocolHandler(ph1);
844 registry()->OnAcceptRegisterProtocolHandler(ph2);
845 registry()->OnAcceptRegisterProtocolHandler(ph3);
847 ASSERT_TRUE(registry()->IsDefault(ph3));
848 registry()->RemoveHandler(ph3);
849 ASSERT_TRUE(registry()->IsDefault(ph2));
850 registry()->OnAcceptRegisterProtocolHandler(ph3);
851 ASSERT_TRUE(registry()->IsDefault(ph3));
852 registry()->RemoveHandler(ph2);
853 ASSERT_TRUE(registry()->IsDefault(ph3));
854 registry()->RemoveHandler(ph3);
855 ASSERT_TRUE(registry()->IsDefault(ph1));
862 registry()->OnAcceptRegisterProtocolHandler(ph1);
863 registry()->OnAcceptRegisterProtocolHandler(ph2);
864 registry()->OnAcceptRegisterProtocolHandler(ph3);
865 registry()->RemoveHandler(ph3);
868 registry()->GetHandlersFor("mailto");
878 registry()->OnAcceptRegisterProtocolHandler(ph1);
879 registry()->ClearDefault(scheme);
882 registry()->CreateJobInterceptorFactory());
889 registry()->OnAcceptRegisterProtocolHandler(ph1);
892 registry()->CreateJobInterceptorFactory());
894 registry()->Disable();
903 registry()->OnAcceptRegisterProtocolHandler(ph1);
904 ASSERT_TRUE(registry()->AttemptReplace(ph2));
905 const ProtocolHandler& handler(registry()->GetHandlerFor("mailto"));
916 registry()->OnAcceptRegisterProtocolHandler(ph1);
917 registry()->OnAcceptRegisterProtocolHandler(ph3);
918 ASSERT_TRUE(registry()->AttemptReplace(ph2));
919 const ProtocolHandler& handler(registry()->GetHandlerFor("mailto"));
930 registry()->OnAcceptRegisterProtocolHandler(ph1);
931 registry()->OnAcceptRegisterProtocolHandler(ph2);
934 ASSERT_TRUE(registry()->AttemptReplace(ph3));
935 const ProtocolHandler& handler(registry()->GetHandlerFor("mailto"));
937 registry()->RemoveHandler(ph3);
938 ASSERT_TRUE(registry()->GetHandlerFor("mailto").IsEmpty());
960 registry()->AddPredefinedHandler(
962 registry()->InitProtocolSettings();
964 registry()->GetRegisteredProtocols(&protocols);
995 registry()->InitProtocolSettings();
1002 ASSERT_TRUE(registry()->IsDefault(p1u1));
1003 ASSERT_FALSE(registry()->IsDefault(p1u2));
1006 registry()->OnDenyRegisterProtocolHandler(p2u1);
1011 ASSERT_FALSE(registry()->IsDefault(p2u1));
1013 registry()->RemoveHandler(p1u1);
1018 ASSERT_TRUE(registry()->IsDefault(p1u1));
1021 registry()->RemoveHandler(p3u1);
1026 ASSERT_TRUE(registry()->IsDefault(p3u1));
1028 registry()->RemoveHandler(p1u2);
1033 ASSERT_TRUE(registry()->IsDefault(p1u1));
1036 registry()->OnAcceptRegisterProtocolHandler(p1u3);
1041 ASSERT_FALSE(registry()->IsDefault(p1u1));
1042 ASSERT_TRUE(registry()->IsDefault(p1u3));
1044 registry()->RemoveHandler(p1u3);
1049 ASSERT_FALSE(registry()->IsDefault(p1u3));
1050 ASSERT_TRUE(registry()->IsDefault(p1u1));
1051 ASSERT_TRUE(registry()->IsDefault(p3u1));
1052 ASSERT_FALSE(registry()->IsDefault(p2u1));
1072 registry()->InitProtocolSettings();
1079 registry()->OnIgnoreRegisterProtocolHandler(p2u2);
1086 registry()->RemoveIgnoredHandler(p2u1);
1093 registry()->RemoveIgnoredHandler(p1u2);
1101 registry()->RemoveIgnoredHandler(p1u1);
1107 registry()->RemoveIgnoredHandler(p2u2);
1113 registry()->OnIgnoreRegisterProtocolHandler(p2u1);
1120 registry()->RemoveIgnoredHandler(p2u1);