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

Unified Diff: chrome/test/remoting/remote_desktop_browsertest.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
« no previous file with comments | « chrome/browser/ui/webui/policy_ui.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/remoting/remote_desktop_browsertest.cc
diff --git a/chrome/test/remoting/remote_desktop_browsertest.cc b/chrome/test/remoting/remote_desktop_browsertest.cc
index 82bf6e72ade37b0c6d0c74ce8a67760441b1272e..e03736e898038d7d89f48f82904e8529282939b0 100644
--- a/chrome/test/remoting/remote_desktop_browsertest.cc
+++ b/chrome/test/remoting/remote_desktop_browsertest.cc
@@ -18,6 +18,7 @@
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/test/test_utils.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
@@ -134,34 +135,31 @@ void RemoteDesktopBrowserTest::UninstallChromotingApp() {
}
void RemoteDesktopBrowserTest::VerifyChromotingLoaded(bool expected) {
- const extensions::ExtensionSet* extensions =
- extension_service()->extensions();
- scoped_refptr<const extensions::Extension> extension;
bool installed = false;
- for (extensions::ExtensionSet::const_iterator iter = extensions->begin();
- iter != extensions->end(); ++iter) {
- extension = *iter;
+ for (const scoped_refptr<const extensions::Extension>& extension :
+ extensions::ExtensionRegistry::Get(profile())->enabled_extensions()) {
// Is there a better way to recognize the chromoting extension
// than name comparison?
if (extension->name() == extension_name_) {
+ if (extension_) {
+ EXPECT_EQ(extension.get(), extension_);
+ } else {
+ extension_ = extension.get();
+ }
+
installed = true;
break;
}
}
if (installed) {
- if (extension_)
- EXPECT_EQ(extension.get(), extension_);
- else
- extension_ = extension.get();
-
// Either a V1 (TYPE_LEGACY_PACKAGED_APP) or a V2 (TYPE_PLATFORM_APP ) app.
- extensions::Manifest::Type type = extension->GetType();
+ extensions::Manifest::Type type = extension_->GetType();
EXPECT_TRUE(type == extensions::Manifest::TYPE_PLATFORM_APP ||
type == extensions::Manifest::TYPE_LEGACY_PACKAGED_APP);
- EXPECT_TRUE(extension->ShouldDisplayInAppLauncher());
+ EXPECT_TRUE(extension_->ShouldDisplayInAppLauncher());
}
ASSERT_EQ(installed, expected);
« no previous file with comments | « chrome/browser/ui/webui/policy_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698