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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/private_api_file_system.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_file_system.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
index 2a2701c5d8e0bb7c41e9898e26287165064a4bb3..ea1ae24b95bf3fa51571deedf3198aaccd36a382 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
@@ -15,7 +15,6 @@
#include "base/task_runner_util.h"
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/chromeos/drive/drive.pb.h"
-#include "chrome/browser/chromeos/drive/drive_integration_service.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/event_router.h"
@@ -441,24 +440,20 @@ bool FileBrowserPrivateGetSizeStatsFunction::RunImpl() {
return false;
if (file_path == drive::util::GetDriveMountPointPath()) {
- drive::DriveIntegrationService* integration_service =
- drive::DriveIntegrationServiceFactory::GetForProfile(profile_);
- // |integration_service| is NULL if Drive is disabled.
- if (!integration_service) {
+ drive::FileSystemInterface* file_system =
+ drive::util::GetFileSystemByProfile(profile());
+ if (!file_system) {
+ // |file_system| is NULL if Drive is disabled.
// If stats couldn't be gotten for drive, result should be left
// undefined. See comments in GetDriveAvailableSpaceCallback().
SendResponse(true);
return true;
}
- drive::FileSystemInterface* file_system =
- integration_service->file_system();
-
file_system->GetAvailableSpace(
base::Bind(&FileBrowserPrivateGetSizeStatsFunction::
GetDriveAvailableSpaceCallback,
this));
-
} else {
uint64* total_size = new uint64(0);
uint64* remaining_size = new uint64(0);

Powered by Google App Engine
This is Rietveld 408576698