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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/file_tasks.cc

Issue 23523022: Replace GetForProfile by Get{FileSystem,DriveAppRegistry,DriveService)ByProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/extensions/file_manager/file_tasks.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_tasks.cc b/chrome/browser/chromeos/extensions/file_manager/file_tasks.cc
index f1249fdc7545918dd0b779004db602ea21873d91..83d426a30ffd0f1b9c54447fa2c4aa0c22a78f80 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_tasks.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_tasks.cc
@@ -9,7 +9,7 @@
#include "base/prefs/pref_service.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/chromeos/drive/drive_app_registry.h"
-#include "chrome/browser/chromeos/drive/drive_integration_service.h"
+#include "chrome/browser/chromeos/drive/file_system_util.h"
#include "chrome/browser/chromeos/drive/file_task_executor.h"
#include "chrome/browser/chromeos/extensions/file_manager/file_browser_handlers.h"
#include "chrome/browser/chromeos/extensions/file_manager/fileapi_util.h"
@@ -486,15 +486,14 @@ void FindAllTypesOfTasks(
// Google document are not opened by drive apps but file manager.
if (!has_google_document) {
- drive::DriveIntegrationService* integration_service =
- drive::DriveIntegrationServiceFactory::GetForProfile(profile);
- // |integration_service| is NULL if Drive is disabled.
- if (!integration_service || !integration_service->drive_app_registry())
+ drive::DriveAppRegistry* app_registry =
+ drive::util::GetDriveAppRegistryByProfile(profile);
+ if (!app_registry) {
+ // |app_registry| is NULL if Drive is disabled.
return;
+ }
- FindDriveAppTasks(*integration_service->drive_app_registry(),
- path_mime_set,
- result_list);
+ FindDriveAppTasks(*app_registry, path_mime_set, result_list);
}
// Find and append file handler tasks. We know there aren't duplicates

Powered by Google App Engine
This is Rietveld 408576698