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

Unified Diff: chrome/browser/extensions/api/push_messaging/push_messaging_canary_test.cc

Issue 709813004: Remove the deprecated function ExtensionService::extensions(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed thestig@'s comments. Created 6 years, 1 month 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/api/push_messaging/push_messaging_canary_test.cc
diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_canary_test.cc b/chrome/browser/extensions/api/push_messaging/push_messaging_canary_test.cc
index 76a3ef59797cf7debbf5619d6c6372615fe8505a..af488425f92602a40cab6077e3099e6758d7ac92 100644
--- a/chrome/browser/extensions/api/push_messaging/push_messaging_canary_test.cc
+++ b/chrome/browser/extensions/api/push_messaging/push_messaging_canary_test.cc
@@ -9,13 +9,12 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/api/push_messaging/sync_setup_helper.h"
#include "chrome/browser/extensions/extension_apitest.h"
-#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/render_frame_host.h"
-#include "extensions/common/extension_set.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/test/result_catcher.h"
#include "net/dns/mock_host_resolver.h"
@@ -133,19 +132,19 @@ class PushMessagingCanaryTest : public ExtensionApiTest {
IN_PROC_BROWSER_TEST_F(PushMessagingCanaryTest, MANUAL_ReceivesPush) {
InitializeSync();
- const ExtensionSet* installed_extensions = extension_service()->extensions();
- if (!installed_extensions->Contains(kTestExtensionId)) {
+ ExtensionRegistry* registry = ExtensionRegistry::Get(profile());
+ if (!registry->enabled_extensions().GetByID(kTestExtensionId)) {
const Extension* extension =
LoadExtension(test_data_dir_.AppendASCII("push_messaging_canary"));
ASSERT_TRUE(extension);
}
- ASSERT_TRUE(installed_extensions->Contains(kTestExtensionId));
+ ASSERT_TRUE(registry->enabled_extensions().GetByID(kTestExtensionId));
ResultCatcher catcher;
catcher.RestrictToBrowserContext(profile());
const Extension* extension =
- extension_service()->extensions()->GetByID(kTestExtensionId);
+ registry->enabled_extensions().GetByID(kTestExtensionId);
ASSERT_TRUE(extension);
ui_test_utils::NavigateToURL(
browser(), extension->GetResourceURL("push_messaging_canary.html"));

Powered by Google App Engine
This is Rietveld 408576698