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

Unified Diff: chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc
===================================================================
--- chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc (revision 175396)
+++ chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc (working copy)
@@ -4,7 +4,6 @@
#include "base/synchronization/waitable_event.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/api/infobars/infobar_service.h"
#include "chrome/browser/intents/register_intent_handler_infobar_delegate.h"
#include "chrome/browser/intents/web_intents_registry.h"
#include "chrome/browser/intents/web_intents_registry_factory.h"
@@ -44,7 +43,6 @@
virtual void SetUp() {
ChromeRenderViewHostTestHarness::SetUp();
- InfoBarService::CreateForWebContents(web_contents());
profile()->CreateWebDataService();
web_intents_registry_ = BuildForProfile(profile());
@@ -70,13 +68,12 @@
service.service_url = GURL("google.com");
service.action = ASCIIToUTF16("http://webintents.org/share");
service.type = ASCIIToUTF16("text/url");
- RegisterIntentHandlerInfoBarDelegate delegate(
- InfoBarService::FromWebContents(web_contents()),
- WebIntentsRegistryFactory::GetForProfile(profile()),
- service, NULL, GURL());
+ scoped_ptr<RegisterIntentHandlerInfoBarDelegate> infobar_delegate(
+ RegisterIntentHandlerInfoBarDelegate::Create(web_intents_registry_,
+ service));
EXPECT_CALL(*web_intents_registry_, RegisterIntentService(service));
- delegate.Accept();
+ infobar_delegate->Accept();
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698