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

Unified Diff: chrome/browser/extensions/notifications_apitest.cc

Issue 6803012: Profile shouldn't own DesktopNotificationService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix dependency manager unit test Created 9 years, 8 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/extensions/notifications_apitest.cc
diff --git a/chrome/browser/extensions/notifications_apitest.cc b/chrome/browser/extensions/notifications_apitest.cc
index 7e2a34d1d14c90a2501763b390bffa64de083bd6..22eea078a850fde078fd6281f328368ec206c485 100644
--- a/chrome/browser/extensions/notifications_apitest.cc
+++ b/chrome/browser/extensions/notifications_apitest.cc
@@ -1,10 +1,11 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
+#include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -16,11 +17,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FLAKY_Notifications) {
ASSERT_TRUE(RunExtensionTest("notifications/has_not_permission")) << message_;
ASSERT_TRUE(RunExtensionTest("notifications/has_permission_manifest"))
<< message_;
- browser()->profile()->GetDesktopNotificationService()
+ DesktopNotificationServiceFactory::GetForProfile(browser()->profile())
->GrantPermission(GURL(
"chrome-extension://peoadpeiejnhkmpaakpnompolbglelel"));
ASSERT_TRUE(RunExtensionTest("notifications/has_permission_prefs"))
<< message_;
#endif
}
-

Powered by Google App Engine
This is Rietveld 408576698