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

Unified Diff: chrome/browser/chromeos/first_run/drive_first_run_controller.cc

Issue 218683011: Remove ExtensionService::[Get|Is]InstalledApp() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ces_get_installed_ext_by_url
Patch Set: Created 6 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/chromeos/first_run/drive_first_run_controller.cc
diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
index 2bbd9fc3e097cedbbb97c649415b6e619c393c06..e8c8f00f4523e015720446fc53584b6f16909dfa 100644
--- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
+++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
@@ -32,8 +32,10 @@
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/extension.h"
+#include "extensions/common/extension_set.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -297,10 +299,9 @@ bool DriveWebContentsManager::ShouldCreateWebContents(
return true;
// Check that the target URL is for the Drive app.
- ExtensionService* service =
- extensions::ExtensionSystem::Get(profile_)->extension_service();
- const extensions::Extension *extension =
- service->GetInstalledApp(target_url);
+ const extensions::Extension* extension =
+ extensions::ExtensionRegistry::Get(profile_)
+ ->enabled_extensions().GetAppByURL(target_url);
if (!extension || extension->id() != app_id_)
return true;

Powered by Google App Engine
This is Rietveld 408576698