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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/private_api_util.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/private_api_util.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
index 720e32a3a0ec0e2146ba2b7ae6927807b6f26e6b..8b90667262e6c373213fa79956781c4d65f39347 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
@@ -6,8 +6,8 @@
#include "base/files/file_path.h"
#include "chrome/browser/chromeos/drive/drive.pb.h"
-#include "chrome/browser/chromeos/drive/drive_integration_service.h"
#include "chrome/browser/chromeos/drive/file_errors.h"
+#include "chrome/browser/chromeos/drive/file_system_interface.h"
#include "chrome/browser/chromeos/drive/file_system_util.h"
#include "chrome/browser/chromeos/extensions/file_manager/fileapi_util.h"
#include "chrome/browser/chromeos/fileapi/file_system_backend.h"
@@ -48,8 +48,8 @@ void ContinueGetSelectedFileInfo(Profile* profile,
void GetSelectedFileInfoInternal(Profile* profile,
scoped_ptr<GetSelectedFileInfoParams> params) {
DCHECK(profile);
- drive::DriveIntegrationService* integration_service =
- drive::DriveIntegrationServiceFactory::GetForProfile(profile);
+ drive::FileSystemInterface* file_system =
+ drive::util::GetFileSystemByProfile(profile);
for (size_t i = params->selected_files.size();
i < params->file_paths.size(); ++i) {
@@ -59,8 +59,8 @@ void GetSelectedFileInfoInternal(Profile* profile,
params->selected_files.push_back(
ui::SelectedFileInfo(file_path, base::FilePath()));
} else {
- // |integration_service| is NULL if Drive is disabled.
- if (!integration_service) {
+ // |file_system| is NULL if Drive is disabled.
+ if (!file_system) {
ContinueGetSelectedFileInfo(profile,
params.Pass(),
drive::FILE_ERROR_FAILED,
@@ -76,14 +76,14 @@ void GetSelectedFileInfoInternal(Profile* profile,
ui::SelectedFileInfo(file_path, base::FilePath()));
break;
case NEED_LOCAL_PATH_FOR_OPENING:
- integration_service->file_system()->GetFileByPath(
+ file_system->GetFileByPath(
drive::util::ExtractDrivePath(file_path),
base::Bind(&ContinueGetSelectedFileInfo,
profile,
base::Passed(&params)));
return; // Remaining work is done in ContinueGetSelectedFileInfo.
case NEED_LOCAL_PATH_FOR_SAVING:
- integration_service->file_system()->GetFileByPathForSaving(
+ file_system->GetFileByPathForSaving(
drive::util::ExtractDrivePath(file_path),
base::Bind(&ContinueGetSelectedFileInfo,
profile,

Powered by Google App Engine
This is Rietveld 408576698